• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 864
  • Last Modified:

web.config

I have uploaded my site to my web host but i am getting the error below.  The site works ok on my server.


Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

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>
 


My Web.config
==============================================

<?xml version="1.0"?>

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
      <remove name="LocalSqlServer"/>
      <add name="LocalSqlServer" connectionString="Data Source=x.x.x.x;Initial Catalog=vdasite1;User ID=UID;Password=PW" providerName="System.Data.SqlClient"/>
      <add name="AgencyDatabaseConnectionString" connectionString="Data Source=vdasrv1;Initial Catalog=AgencyDatabase;Integrated Security=True;Network Library=dbmssocn" providerName="System.Data.SqlClient"/>
      </connectionStrings>

      <system.web>      
      <roleManager enabled="true"/>
            <compilation debug="true">
            <assemblies>
            <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                                </assemblies>
                                </compilation>

            <authentication mode="Forms"/>
            <customErrors mode="Off">
            </customErrors>
    <pages smartNavigation="true"/>
      </system.web>
</configuration>
0
Kevin Robinson
Asked:
Kevin Robinson
  • 8
  • 3
1 Solution
 
REA_ANDREWCommented:
this will work

<?xml version="1.0"?>

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
     <remove name="LocalSqlServer"/>
     <add name="LocalSqlServer" connectionString="Data Source=x.x.x.x;Initial Catalog=vdasite1;User ID=UID;Password=PW" providerName="System.Data.SqlClient"/>
     <add name="AgencyDatabaseConnectionString" connectionString="Data Source=vdasrv1;Initial Catalog=AgencyDatabase;Integrated Security=True;Network Library=dbmssocn" providerName="System.Data.SqlClient"/>
     </connectionStrings>

     <system.web>    
     <roleManager enabled="true"/>
          <compilation debug="true">
          <assemblies>
          <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
          <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                                </assemblies>
                                </compilation>
          <customErrors mode="Off">
          </customErrors>
    <pages smartNavigation="true"/>
     </system.web>
</configuration>
0
 
REA_ANDREWCommented:
VolunteerDevelopmentAgency

Important note. I assume they are your correct database connection details.  It will not aid you in getting a solution posting these details and I assume you have done this by Mistake.  This site can be viewed across the internet meaning that characters could get hold of this information.

I do not specifically mean any EE Memeber but you never Know.

Please email COmmunity Support and ask that your question be edited to x-out your connection details, for future security to your database, I would also advise you change the username and password immediately to prevent any un authorised entry.

Thanks

Andrew
0
 
Kevin RobinsonPrivate VB.NET ContractorAuthor Commented:
Still the same!

0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
REA_ANDREWCommented:
try this

<?xml version="1.0"?>

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <connectionStrings>
    <remove name="LocalSqlServer"/>
     <add name="LocalSqlServer" connectionString="Data Source=x.x.x.x;Initial Catalog=vdasite1;User ID=UID;Password=PW" providerName="System.Data.SqlClient"/>
    <add name="AgencyDatabaseConnectionString" connectionString="Data Source=vdasrv1;Initial Catalog=AgencyDatabase;Integrated Security=True;Network Library=dbmssocn" providerName="System.Data.SqlClient"/>
  </connectionStrings>

  <system.web>
    <roleManager enabled="true"/>
    <compilation debug="true">
      <assemblies>
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      </assemblies>
    </compilation>
    <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
      <error statusCode="403" redirect="NoAccess.htm" />
      <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    <pages smartNavigation="true"/>
  </system.web>
</configuration>
0
 
REA_ANDREWCommented:
actually try this. I had similar trouble with this issue my self

<?xml version="1.0"?>

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
  <connectionStrings>
     <add name="LocalSqlServer" connectionString="Data Source=x.x.x.x;Initial Catalog=vdasite1;User ID=UID;Password=PW" providerName="System.Data.SqlClient"/>
    <add name="AgencyDatabaseConnectionString" connectionString="Data Source=vdasrv1;Initial Catalog=AgencyDatabase;Integrated Security=True;Network Library=dbmssocn" providerName="System.Data.SqlClient"/>
  </connectionStrings>

  <system.web>
    <roleManager enabled="true"/>
    <compilation debug="true">
      <assemblies>
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
      </assemblies>
    </compilation>
    <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
      <error statusCode="403" redirect="NoAccess.htm" />
      <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    <pages smartNavigation="true"/>
  </system.web>
</configuration>
0
 
Kevin RobinsonPrivate VB.NET ContractorAuthor Commented:
Still the same
0
 
REA_ANDREWCommented:
how about this?

<?xml version="1.0"?>

<configuration>
    <appSettings/>
  <connectionStrings>
     <add name="LocalSqlServer" connectionString="Data Source=x.x.x.x;Initial Catalog=vdasite1;User ID=UID;Password=PW" providerName="System.Data.SqlClient"/>
    <add name="AgencyDatabaseConnectionString" connectionString="Data Source=vdasrv1;Initial Catalog=AgencyDatabase;Integrated Security=True;Network Library=dbmssocn" providerName="System.Data.SqlClient"/>
  </connectionStrings>
    <system.web>

        <compilation debug="false" />

        <customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>

    </system.web>
</configuration>
0
 
REA_ANDREWCommented:
I am stripping it down to find the error
0
 
REA_ANDREWCommented:
Might be the connection string also. Are you connection to MS SQL server?
0
 
Kevin RobinsonPrivate VB.NET ContractorAuthor Commented:
I have taken the connection strings out.  They are not needed in the web.config, i have them stored in a seperate class.  Yes I am connecting to a SQL database but i am specifing IP address so that should not really change.

Could it be something to do with v 2.0.  


0
 
REA_ANDREWCommented:
"Could it be something to do with v 2.0."

Many hosting companies currently only support V1.1 .

Can you access the server's IIS to change the version to 2.0?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

  • 8
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now