Plz Help with Web.Config Setup Problem

Last post 07-18-2008 4:26 AM by PrimaryRacer. 2 replies.

Sort Posts:

  • Plz Help with Web.Config Setup Problem

    07-17-2008, 1:56 PM

    I'm using Visual Web Developer 2005 on my Machine and My Web Server and SQL server 2000 are Hosted on a Remote Machine. All the settings were working perfectly fine untill i try to add <ConnectionStrings> element in my web.config file. If i add <ConnectionStrings> element in my web.config file then apperently it dosent like and and give the followind Error

    Now i Knw that this error can be resolved by adding <customErrors mode ="Off"> element, but the question is how to use both togather.

    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>

    I've try renaming my web.config file, bt that didn't work either, please see the file below, Any help to solve this problem will be highaly appriciated.

    <?
    xml version="1.0" encoding="UTF-8" ?><configuration>

     

    <connectionStrings>

    <add name="ParsDotNet" connectionString="Server=sql0;Database=ParsDotNet;uid=xxxx;pwd=xxx;" providerName="System.Data.SqlClient" /></connectionStrings>

     

    <system.web>

    <customErrors mode ="Off">

    </customErrors>

    </system.web>

    </configuration>

  • Re: Plz Help with Web.Config Setup Problem

    07-17-2008, 2:28 PM
    Answer

    PrimaryRacer:
    Now i Knw that this error can be resolved by adding <customErrors mode ="Off"> element, but the question is how to use both togather.

    You don't.  You set the configuration to Off and then see the real error so you can diagnose what's wrong.  If you still get this error, make sure you configured the folder as an application in IIS.

    Jeff

    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
  • Re: Plz Help with Web.Config Setup Problem

    07-18-2008, 4:26 AM

    Thanks Jeff

    Sorry It's bit more complecated, Apprently at my work place thay are using the same sever to host their ASP classic wqebsites and i dont have rights to change directory settings . Is there any other way i can use the same server to run ASP.NET 2.0 Websites. I only have another folder created for on that server to run my website. And my sql server 2000 is also hosted on a different machine.

    It works fine if add the ConnectionString on Page_Load Subroutine and extract all data, bt i was planning to use ASP.NET 2.0 data controls as there is lots of lerning material availibe for that.

    Can i add my own web.config file with a different name to specify <ConnectionsStrings> element.

    Thanks in Advance

     

     

     

Page 1 of 1 (3 items)
Microsoft Communities
Page view counter