문제

이것은 나의 첫 번째 ASP.NET 프로젝트이며 즉시 갇혀 있습니다.

원격 webhotel에 BugTracker를 설정했지만 ConnectionStrings가 작동하지 않습니다. 내 호스트가 Hosting.org라고 불리고 내 웹 사이트가 www.trallala.com이라고 말하면

이 스크립트에서 무엇을 변경해야합니까?

<configSections>
</configSections>

<system.web>

    <!--
    BugTracker.NET is not compatible with Session serialization.

    Timeout session after 120 minutes
    -->

    <sessionState mode="InProc" timeout="120"/>

    <compilation debug="true">
        <assemblies>
            <add assembly="System.DirectoryServices.Protocols, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        </assemblies>
    </compilation>
    <pages validateRequest="true" />
    <!-- A few people over the years have needed to override the default IIS settings...
    <httpRuntime executionTimeout="300" maxRequestLength="51200"/>
    -->

    <!-- for my testing <globalization culture="de-DE" uiCulture="en-US" /> -->

</system.web>
<appSettings>
    <!-- 

        ********* QUICK START *************

        If you want to get started quickly, then just change the following
        and then try to log in:

            ConnectionString
            AbsouteUrlPrefix

        After you can log in and create a bug, then you probably want to
        set up the email integration.  Set up the following:

            ErrorEmailTo
            ErrorEmailFrom

            NotificationEmailEnabled
            NotificationEmailFrom

            And your SMTP settings below.

    -->
    <!--
        Change this to point to your database
    -->

    <add key="ConnectionString" value="server=(local)\SQLEXPRESS;database=btnet;user id=sa;password=x;Trusted_Connection=no"/>
    <!--
        Used when creating absolute href's.  For example, in notification emails.
        Don't forget trailing slash!.
    -->
    <add key="AbsoluteUrlPrefix" value="http://127.0.0.1/btnet2/"/>
    <!--
        You can turn the logging and emailing of errors on and off.
        Log file name is "btnet_log_yyyy_mm_dd.txt"

        For the LogFileFolder setting, if you specify the folder starting with a 
        drive letter or the \\ that indicates a UNC path, it's treated as a full path.  
        For example: c:\\something or \\somemachine\something

        Otherwise it's treated as a path relative to where you virtual directory is
        located.

        LogEnabled turns on and off logging as a whole.
        LogSqlEnabled turns on and off just the logging of SQL statements, but
        that's about 98% of what gets logged, so if you want to reduce the
        volume, turn that off.

    -->
    <add key="LogEnabled" value="1"/>
    <add key="LogSqlEnabled" value="1"/>
    <add key="LogFileFolder" value="App_Data\logs"/>
    <!-- If BugTracker.NET itself experiences an error, it can send an email notification -->
    <add key="ErrorEmailEnabled" value="1"/>
    <add key="ErrorEmailTo" value="YOUR EMAIL HERE"/>
    <add key="ErrorEmailFrom" value="FROM EMAIL HERE"/>


    <!--
        You can "subscribe" to email notifications on a per-bug basis.
        You will receive an email whenever the bug is updated.
    -->
    <add key="NotificationEmailEnabled" value="1"/>
    <add key="NotificationEmailFrom" value="FROM EMAIL HERE"/>

    <!--
        This controls the format of the subject of the email notifications.
        The available variables are:
        $THING$ - from the "SingularBugLabel" setting
        $BUGID$
        $ACTION$ - added or changed
        $SHORTDESC$
        $PROJECT$
        $CATEGORY$
        $ORGANIZATION$
        $PRIORITY$
        $STATUS$
        $TRACKINGID$ - from the "TrackingIdString" setting
    -->
    <add key="NotificationSubjectFormat" value="$THING$:$BUGID$ was $ACTION$ - $SHORTDESC$ $TRACKINGID$"/>

    <!--
        If you aren't using the local SMTP server that comes with IIS,
        set the name, user, and password for your SMTP server here.
    -->

    <!-- Sample SMTP Settings -->

    <!--
        These settings work with my SBC account
    -->
    <!--
    <add key="SmtpServer" value="smtp.att.yahoo.com"/>
    <add key="SmtpServerAuthenticateUser" value="ctrager@sbcglobal.net"/>
    <add key="SmtpServerPort" value="465"/>
    <add key="SmtpUseSSL" value="1"/>
    <add key="SmtpServerAuthenticatePassword" value="MY PASSWORD"/>
    -->
    <!--
        These settings work with my GMail account
    -->
    <!--
    <add key="SmtpServer" value="smtp.gmail.com"/>
    <add key="SmtpServerAuthenticateUser" value="ctrager@gmail.com"/>
    <add key="SmtpServerPort" value="465"/>
    <add key="SmtpUseSSL" value="1"/>
    <add key="SmtpServerAuthenticatePassword" value="MY PASSWORD"/>
    -->


    <!--
        These settings work with my GoDaddy account
    -->

    <!--        
    <add key="SmtpServer" value="relay-hosting.secureserver.net"/>
    <add key="SmtpServerAuthenticateUser" value="ctrager@ifdefined.com"/>
    <add key="SmtpServerAuthenticatePassword" value="MY PASSWORD"/>
    <add key="SmtpServerPort" value="25"/>      
    -->

    <!--
        Specify the pickup directory if you have the problem described here:
        http://support.microsoft.com/default.aspx?scid=kb;en-us;816789#8
    -->

    <!--
    <add key="SmtpServerPickupDirectory" value=""/>
    <add key="SmtpSendUsing" value="1"/>
    -->


    <!--
        Ignore this setting unless you are esperiencing the symptoms
        related to this: http://cr.yp.to/docs/smtplf.html
    -->
    <!--
    <add key="SmtpForceReplaceOfBareLineFeeds" value="1"/>
    -->
    <!--
        By default, emails are UTF8 encoded.  If that doesn't work for you,
        uncomment the following.
    -->
    <!--
    <add key="BodyEncodingUTF8" value="0"/>
    -->
도움이 되었습니까?

해결책

<add key="ConnectionString" value="Persist Security Info=true;User ID=bugtracker;Password=bugs;Initial Catalog=BugTracker;Data Source=[IP ADDRESS]" />

이것이 Web.Config에서 추가/편집 해야하는 것입니다. 설정이 시작되면 BugTracker는 스크립트를 실행하여 적절한 데이터베이스 요소를 만듭니다.

다른 팁

"ConnectionString"이 올바른 데이터베이스를 가리키고 DB 액세스에 대한 올바른 사용자 이름과 비밀번호를 가지고 있는지 확인해야합니다.

데이터베이스가 실제로 UP 및 실행 중이며 DB의 사용자로 로그인하여 단순히 사용자 이름과 비밀번호가 올바른지 확인할 수 있습니다.

그렇지 않은 경우 문제가 ASP.NET 구성과 관련이 없습니다.

그만큼 BugTracker.net 문서 연결 문자열에 대한이 섹션을 포함합니다.

가장 어려운 부분은 ... 대부분의 사람들에게 ConnectionString이 작동하는 것입니다.

도움말은 다음 링크, "SQLConnection (.NET)"섹션을 참조하십시오.
http://www.connectionstrings.com/?carrier=sqlserver2005
http://www.sqlstrings.com/sql-server-connection-strings.htm
https://web.archive.org/web/1/http://articles.techrepublic%2ecom%2ecom/5100-3513_11-6084879.html

연결 문자열을 올바르게 얻으려고 할 수있는 또 다른 것은 다음과 같습니다.

  1. 새 빈 파일을 만들고 이름을 test.udl로 만듭니다.

  2. 두 번 클릭하면 "데이터 링크 속성"대화 상자가 나타납니다.

  3. "제공자"탭에서 "SQL Server 용 Microsoft Ole DB 제공 업체"또는 "SQL Native Client"를 선택하십시오.

  4. "Connections"탭에서 다양한 설정을 시도하고 "테스트 연결"버튼을 사용하여 테스트하십시오. 작동하면 "확인"을 클릭하십시오.

  5. Notepad에서 test.udl 파일을 열고 "provider ="로 시작하는 줄을 web.config "ConnectionString"값으로 복사하지만 "provider = sqlncli.1"이라는 작은 부분을 삭제하십시오.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top