Friday, October 8, 2010

Some Tips to work with Visual Studio

Couple of weeks back i was facing a problem as i have developed a independent Application which i need to deploy in a sub folder
and run it. It is Windows based web application which need to be deployed in a subfolder. Now the problem start with Web.config file
it was taking the root Web.Config but as i created an indepenedent applicaiton which has things related to the application in web.config i tried to search on google for does not find anything related to it then i tried to see resources
related to Web.Config on Micorsoft and found that it is possible.

How

This is how you can run your application in a sub folder and use its own web.config file too on IIS Server.

I have used the given code in Main Site's Web.Config file

<location path="." inheritInChildApplications="false">
<system.web></system.web></location>

There was another problem related to App_code folder which has some classes which i have defined for the project.

Server Error in '/' Application.

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: CS0433: The type 'SiteSettings' exists in both 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\4af4b811\75e627a5\App_Code.i77upflw.dll' and 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\4af4b811\75e627a5\assembly\dl3\3e7d3859\c2b075c9_a13ecb01\?????????.DLL'

Source Error:

I tried to find the solution for it and it was prity simple what i need to do is the put all my app_code folder files in App_LocalResources this folder when you right click the Visual Studio UI automatically ask if you want to create folder like this.

No comments: