[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

web.config

Posted on 2006-05-11
11
Medium Priority
?
859 Views
Last Modified: 2008-02-01
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
Comment
Question by:Kevin Robinson
  • 8
  • 3
11 Comments
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16656198
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
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16656254
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
 
LVL 3

Author Comment

by:Kevin Robinson
ID: 16656256
Still the same!

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16656268
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
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16656276
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
 
LVL 3

Author Comment

by:Kevin Robinson
ID: 16656408
Still the same
0
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16656464
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
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16656494
I am stripping it down to find the error
0
 
LVL 20

Expert Comment

by:REA_ANDREW
ID: 16656500
Might be the connection string also. Are you connection to MS SQL server?
0
 
LVL 3

Author Comment

by:Kevin Robinson
ID: 16656526
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
 
LVL 20

Accepted Solution

by:
REA_ANDREW earned 2000 total points
ID: 16656536
"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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month18 days, 18 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question