Vraag & Antwoord

Webprogrammeren & scripting

ConnectionString error

Anoniem
Bill Gates
5 antwoorden
  • De opdracht is om een webapplicatie te maken.
    Ik heb MS SQL server desktop engine geinstalleerd en verbinding gemaakt met mijn pc.
    Bij EMS MS SQL Manager heb ik een database gemaakt van de webapplicatie.
    en met IIS6 zie ik hem ook staan. en als ik op webapplicatie rechtermuisknop op browse klik dan komt er een login scherm maar als ik inlog krijg ik de volgende melding te zien. :-?

    KLIK!!

    Web.config:
    [code:1:8bb8faf3a0]<?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <system.web>
    <!– DYNAMIC DEBUG COMPILATION
    Set compilation debug="true" to insert debugging symbols (.pdb information)
    into the compiled page. Because this creates a larger file that executes
    more slowly, you should set this value to true only when debugging and to
    false at all other times. For more information, refer to the documentation about
    debugging ASP.NET files.
    –>
    <compilation defaultLanguage="vb" debug="true" />
    <!– CUSTOM ERROR MESSAGES
    Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable.
    Add <error> tags for each of the errors you want to handle.
    –>
    <customErrors mode="Off" />
    <!– AUTHENTICATION
    This section sets the authentication policies of the application. Possible modes are "Windows",
    "Forms", "Passport" and "None"
    –>
    <!–
    <authentication mode="Forms" >
    <forms loginUrl="Login.aspx" name="GGZDBCa" timeout="60" path="/" />
    </authentication>
    –>
    <authentication mode="Windows" />
    <!– AUTHORIZATION
    This section sets the authorization policies of the application. You can allow or deny access
    to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
    (unauthenticated) users.
    –>
    <authorization>
    <!–
    <deny users="?" />
    –>
    <allow users="*" /> <!– Allow all users –>
    <!– <allow users="[comma separated list of users]"
    roles="[comma separated list of roles]"/>
    <deny users="[comma separated list of users]"
    roles="[comma separated list of roles]"/>
    –>
    </authorization>
    <!– APPLICATION-LEVEL TRACE LOGGING
    Application-level tracing enables trace log output for every page within an application.
    Set trace enabled="true" to enable application trace logging. If pageOutput="true", the
    trace information will be displayed at the bottom of each page. Otherwise, you can view the
    application trace log by browsing the "trace.axd" page from your web application
    root.
    –>
    <!– HACK: Tracing. –>
    <trace enabled="false" requestLimit="100" pageOutput="false" traceMode="SortByTime" localOnly="true" />
    <!–
    <trace enabled="true" requestLimit="100" pageOutput="true" traceMode="SortByTime" localOnly="true" />
    –>
    <!– SESSION STATE SETTINGS
    By default ASP.NET uses cookies to identify which requests belong to a particular session.
    If cookies are not available, a session can be tracked by adding a session identifier to the URL.
    To enable cookies, set sessionState cookieless="false".
    –>
    <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;user id=sa;password=root"
    cookieless="false" timeout="480" />
    <!– GLOBALIZATION
    This section sets the globalization settings of the application.
    –>
    <!– <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="nl-NL" uiCulture="nl-NL" /> –>
    <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="nl-NL" uiCulture="nl-NL" />
    <!– FULLY QUALIFY URL FOR CLIENT REDIRECTS
    Some mobile devices require that the URL for client redirects be fully qualified.
    –>
    <httpRuntime useFullyQualifiedRedirectUrl="true" />
    <!– SPECIFY COOKIELESS DATA DICTIONARY TYPE
    This will cause the dictionary contents to appear in the local request url querystring.
    This is required for forms authentication to work on cookieless devices.
    –>
    <mobileControls sessionStateHistorySize="20" cookielessDataDictionaryType="System.Web.Mobile.CookielessData" />
    <deviceFilters>
    <filter name="isHTML32" compare="PreferredRenderingType" argument="html32" />
    <filter name="isWML11" compare="PreferredRenderingType" argument="wml11" />
    <filter name="isCHTML10" compare="PreferredRenderingType" argument="chtml10" />
    <filter name="isGoAmerica" compare="Browser" argument="Go.Web" />
    <filter name="isMME" compare="Browser" argument="Microsoft Mobile Explorer" />
    <filter name="isMyPalm" compare="Browser" argument="MyPalm" />
    <filter name="isPocketIE" compare="Browser" argument="Pocket IE" />
    <filter name="isUP3x" compare="Type" argument="Phone.com 3.x Browser" />
    <filter name="isUP4x" compare="Type" argument="Phone.com 4.x Browser" />
    <filter name="isEricssonR380" compare="Type" argument="Ericsson R380" />
    <filter name="isNokia7110" compare="Type" argument="Nokia 7110" />
    <filter name="prefersGIF" compare="PreferredImageMIME" argument="image/gif" />
    <filter name="prefersWBMP" compare="PreferredImageMIME" argument="image/vnd.wap.wbmp" />
    <filter name="supportsColor" compare="IsColor" argument="true" />
    <filter name="supportsCookies" compare="Cookies" argument="true" />
    <filter name="supportsJavaScript" compare="Javascript" argument="true" />
    <filter name="supportsVoiceCalls" compare="CanInitiateVoiceCall" argument="true" />
    </deviceFilters>
    </system.web>
    <!–
    Applicatievariabelen.
    Waarden moeten overeenkomen met de constanten in Globaal.vb.
    –>
    <appSettings>
    <add key="Initial_Catalog" value="GGZDBC" />
    <!– Motel <add key="Data_Source" value="198.184.231.152" /> –>
    <add key="Data_Source" value="(local)" />
    <add key="User_ID" value="DBC" />
    <add key="Password" value="Ttdra2004" />
    <add key="MessageOfTheDay" value="Gebruik nooit de Back-toets van uw browser!" />
    </appSettings>
    </configuration>[/code:1:8bb8faf3a0]


    hoe los ik dit op? (stage opdracht :P)

    alvast bedankt
  • Je hebt in je code geen connectionstring opgegeven (dat is ook letterlijk wat de foutmelding zegt). Als ik naar je web.config kijk, dan zal je deze nog wel zelf moeten samenstellen uit de losse onderdelen.

    http://www.syncfusion.com/FAQ/aspnet/WEB_c8c.aspx#q387q
  • [code:1:49f216b188]Check if you have specified the connection string
    VB.NET



    dim cn as new SqlConnection("<your connection string>")

    'dim cn as new OleDdConnection("<your connection string>")




    C#



    SqlConnection cn = new SqlConnection("<your connection string>");

    OleDbConnection cn = new OleDbConnection("<your connection string>"); [/code:1:49f216b188]

    wat moet ik nou precies doen :oops: :-?
  • [quote:919b15cea2="Tolgay"]wat moet ik nou precies doen[/quote:919b15cea2]Wat denk je van de manual lezen en er dan achter komen dat je "<your connection string>" verrassenderwijs moet vervangen door de connectionstring die wijst naar jouw database?
  • [quote:df62b71e3f="Bill Gates"][quote:df62b71e3f="Tolgay"]wat moet ik nou precies doen[/quote:df62b71e3f]Wat denk je van de manual lezen en er dan achter komen dat je "<your connection string>" verrassenderwijs moet vervangen door de connectionstring die wijst naar jouw database?[/quote:df62b71e3f]
    in de handleiding staat nix over de connectionstring maarja laatmaar zitten..

Beantwoord deze vraag

Dit is een gearchiveerde pagina. Antwoorden is niet meer mogelijk.