0

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.

1
  • first, make debug=true, cause you're debugging right now. But I'm sure you aren't getting the same error after you turned customErrors mode=Off. Basically your first error said 'hey, an error happened, but we aren't showing it to you yet. change CustomErrors="Off" and we'll tell you.' It's the error you get after that change which is informative and helpful to you and us. Commented Aug 17, 2012 at 15:37

1 Answer 1

1

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> 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.