ASP.net 2.0

En tråd i 'ASP.NET / .NET' startet av gecko, 15 Okt 2010.

  1. gecko Medlem

    Innlegg:
    27
    Hei,Noen har sikkert sett den andre posten min her, men legger ut problemstillingen her.

    Jeg holder på med min første ASP.net side, siden fungerer greit bortsett fra 2 ting.

    1. Når man er logget inn og går inn på forumet for å lese poster så kommer det opp en feilmelding. (legger feilmeldingen inn i bunnen) Er man ikke logget inn er det null problem.

    2. Det er laget en side hvor man kan lagre info om seg selv, navn, epost osv. Dette blir av en eller annen grunn ikke lagret.

    Siden er bygd på Clubstarterkit. Det er kun endret på utseende og oversatt til norsk. Det fungerte helt fint lokalt, problemet kom først etter det ble flyttet til webhotellet.

    Exception Details: System.Data.SqlClient.SqlException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MembersThreads_MemberInfo". The conflict occurred in database "kbsdesi_clubDB", table "dbo.MemberInfo", column 'memberid'.
    The statement has been terminated.

    Source Error:


    Line 391: cmd.Parameters.AddWithValue("@memberid", memberid)
    Line 392: conn.Open()
    Line 393: cmd.ExecuteNonQuery()
    Line 394: conn.Close()
    Line 395: End Using


    Source File: D:\hshome\kbsdesign\kbsdesign.web.surftown.nu\App_Code\Forums.vb Line: 393

    Stack Trace:


    [SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_MembersThreads_MemberInfo". The conflict occurred in database "kbsdesi_clubDB", table "dbo.MemberInfo", column 'memberid'.
    The statement has been terminated.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1950890
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846875
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
    System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +175
    System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
    ClubSiteForums.Forums.MarkThreadRead(Int32 threadid, Guid memberid) in D:\hshome\kbsdesign\kbsdesign.web.surftown.nu\App_Code\Forums.vb:393
    ASP.forum_thread_aspx.Page_Load(Object sender, EventArgs e) in D:\hshome\kbsdesign\kbsdesign.web.surftown.nu\Forum\Thread.aspx:80
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    System.Web.UI.Control.LoadRecursive() +50
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
     

Del denne siden