Search This Blog

Thursday, January 31, 2008

Compiler Error Message: CS0016: Could not write to output file 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\xxxxxx\xxxx

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0016: Could not write to output file 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\wholesales\xxxxx\xxxxx\App_Code.xxxxxxx.dll' -- 'Access is denied. '




After some antivirus activities, my partner development machine face issue above.

This may due to some permission setting in Temp folder. To solve it,

1. Go to %Systemroot%, normally C:\WINDOWS or C:\WINNT
2. Right-click the Temporary folder (mine is C:\WINDOWS\Temp) and select Sharing and Security. Select the Security tab and take a look at the list of “Group or user names:”
3. NETWORK SERVICE should be in the list. If it is not, click Add and type Network Service in the text box:

4. Make sure NETWORK SERVICE have Full Control in the Permissions list.

5. Click OK.

6. Restart IIS (Run iisreset)

Test on the web, and it solved.





If you still have the same problem, please check whether you are using McAfee antivirus. If yes, it's probably cause by the access protected properties setting in mcAfee antivirus. Please make sure you unchecked "Prevent execution of scripts from the Temps folder" in "Access Protection Properties"
To do so, right click on McAfee icon in Taskbar and Click on "VirusScan Console..."


Double click on "Access Protection" and a new "Access Protection Properties" window will pop out. Make sure you unchecked "Prevent execution of scripts from the Temps folder" under Block column. Click OK to close all the window.


Problem should be solved.

Friday, January 25, 2008

VBScript New Line

I do have some projects that written in Classic ASP. I come accross the case that need to draw NewLine in Classic ASP.

Response.Write (vbCrLf) solve my problem

Thursday, January 24, 2008

Create failed for Login 'xxx'. (Microsoft.SqlServer.Express.Smo)

I was trying to create a user with weak Login Name and password. Error message below shown.

Create failed for Login 'xxx'. (Microsoft.SqlServer.Express.Smo)
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

The MUST_CHANGE option is not supported by this version of Microsoft Windows. (Microsoft SQL Server, Error: 15195)





What i do is uncheck the "Enforce password policy" when create the new user. This way you will not get the error message, but this is not the recommended way for the production Login Name and Password.





Problem solved.

Wednesday, January 16, 2008

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page ...

I backup a database called RatePosts from production server and restored it on my development machine. When I tried to access the diagram I received the following message:

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of theDatabase Properties dialog box or the ALTER AUTHORIZATION statement to setthe database owner to a valid login, then add the database diagram support objects.

To solve that, open a new query and run query below

ALTER AUTHORIZATION ON DATABASE::DatabaseName TO [ComputerName\Administrator];

In my case, my database name: RatePosts, machine name: AppDev05

ALTER AUTHORIZATION ON DATABASE::RatePosts TO [AppDev05\Administrator];

Done. Problem solved.