Thursday, March 22, 2012

Remove warning for Database related Project (Unresolved reference to object)



Adding Database reference:


http://blogs.msdn.com/b/gertd/archive/2009/06/10/system-objects-in-tempdb.aspx 


Simple Solution



The problem is the master.dbscema is not referenced by default (I can only assume because it doesn't make any assumptions about your database setup). So what you need to do is add it:


Open the database project.

  1. Select the "References" folder and right-click select "Add Database Reference".
  2. Add the reference to "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VSTSDB\Extensions\SqlServer\2008\DBSchemas\master.dbschema".
  3. all the warnings disappear.

Special Char in HTML/App.Config

Special Characters in HTML Code





Character


Html
Code




Description


"


"


quotation mark


&


&


ampersand


'


'


apostrophe 


< 


&lt;


less-than sign


> 


&gt;


greater-than sign

Tuesday, March 20, 2012

How to Enable 32-bit Applications on the IIS with Wix

In IIS6, this was a pain area. On a 64-bit Windows 2003 Server, you cannot run worker processes in both 32-bit mode and as well as 64 bit mode. Either only one of them was possible. But, in IIS7, you can run 32-bit and 64-bit worker processes simultaneously. Let’s see how to do it.



Right click on the Application Pool and select “Advanced Settings…” or select the same from the Actions pane after selecting the Application pool
Change the “Enable 32-bit Applications” to True (if you want the application pool to spawn in a 32-bit mode)
Click OK
Below is how you do from the AppCmd:
appcmd apppool set /apppool.name:MyAppPool32bit /enable32BitAppOnWin64:true
appcmd apppool set /apppool.name:MyAppPool32bit /enable32BitAppOnWin64:false
NOTE : By default, it is false.


Using Wix
 <CustomAction Id="SetAppPoolbit"

      Execute="deferred"
      Directory="TARGETDIR"
      ExeCommand="&quot;[WindowsFolder]system32\inetsrv\appcmd.exe&quot; set apppool /apppool.name:&quot;APPPoolName&quot; /enable32BitAppOnWin64:true"/>


Friday, March 16, 2012

Windows Service getting crashed without any errors in event logs


Error in the Windows Error Reports
FriendlyEventName=Stopped working
ConsentKey=CLR20r3
ReportDescription=Stopped working


Resolution
Add local Network Service into the admin group and problem will get resolved.