Reputation: 289
I am trying to deploy my ASP.NET website with database (SQL Server 2008) on a remote server. However, I am getting error from the WebConfig file.
WEBCONFIG:
In VS 2010, the WebConfig contained:
<configuration> <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=SOMETOKEN"/> </assemblies> </compilation> </system.web> </configuration>
When I ran the page on the web server, I got this error:
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
So, I added <customErrors mode="Off"/>
and modified my Web.Config to:
<compilation debug="false" targetFramework="4.0">
<customErrors mode="Off"/>
<assemblies>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
But it won't help. I am still getting the same error. What am I missing? I remember deploying other project WITHOUT ASSEMBLIES (*.dlls), and that worked fine. Is the Assembly messing up something? If yes, can you please suggest the fix?
I am surprised, that there's no SINGLE tutorial explaining the deployment of an ASP.NET "website", and what should be done to the web.config file. What special care should be taken when there's assemblies used (if at all).
I'll appreciate help towards the smooth deployment of the same. Thanks.
Upvotes: 0
Views: 1500
Reputation: 2775
Error: customErrors is inside compilation tag
Change the order to:
<customErrors mode="Off"/>
<compilation debug="false" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
Upvotes: 1