+1-888-365-2779
Try Now
More in this section

Forums / 3.x Pre-release forums (retired) / Create Friendly URL Page Not Found

Create Friendly URL Page Not Found

2 posts, 0 answered
  1. Paul Berger
    Paul Berger avatar
    61 posts
    Registered:
    03 Apr 2006
    03 Dec 2006
    Link to this post
    Hi

    I created a new page Named Login. I tried setting up a friendly URL /Login . When i did that and clicked create it sent me to a page not found error. I then pressed back and got a duplicate Key Issue.

    I found the page was created. I just needed

    Violation of PRIMARY KEY constraint 'PK_sf_CmsPageBase'. Cannot insert duplicate key in object 'dbo.sf_CmsPageBase'.
    Violation of PRIMARY KEY constraint 'PK_sf_CmsPage'. Cannot insert duplicate key in object 'dbo.sf_CmsPage'.
    The statement has been terminated.
    The statement has been terminated.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK_sf_CmsPageBase'. Cannot insert duplicate key in object 'dbo.sf_CmsPageBase'.
    Violation of PRIMARY KEY constraint 'PK_sf_CmsPage'. Cannot insert duplicate key in object 'dbo.sf_CmsPage'.
    The statement has been terminated.
    The statement has been terminated.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PK_sf_CmsPageBase'. Cannot insert duplicate key in object 'dbo.sf_CmsPageBase'.
    Violation of PRIMARY KEY constraint 'PK_sf_CmsPage'. Cannot insert duplicate key in object 'dbo.sf_CmsPage'.
    The statement has been terminated.
    The statement has been terminated.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857386
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734998
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +149
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +886
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
       System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415
       System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135
       Nolics.ORMapper.DataProviders.Connection.InsertRowProcedure(OdbClassInfo clInfo, DataRow row, Int64 newVersion) +520
       Nolics.ORMapper.DataProviders.Connection.Update(DataSet updateData, Int64 newVersion) +273
       Nolics.ORMapper.DataProviders.SQLDataProvider.Update(DataSet updateData) +70
       Nolics.ORMapper.Base.Transaction.Commit(Boolean fCleanIfSuccess) +757
       Nolics.ORMapper.Base.Transaction.Commit() +10
       Telerik.Cms.Web.UI.PageProperties.Button_Command(Object sender, CommandEventArgs e) +371
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +105
       System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +163
       System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +174
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
    
  2. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    04 Dec 2006
    Link to this post
    Hi Paul,

    When setting a friendly URL name, you must bear in mind that your page name should end in .aspx extension unless you set wildcard application mapping. In IIS version 5.x you can do this by adding a new application map:
    1. from your project click Properties, go to the virtual folder tab and click Configuration
    2. in the executable textbox place the path to the aspnet_isapi.dll
    3. in the extension textbox you must specify the ".*" to specify all kinds of extension.

    Also make sure that the "Check that file exist" checkbox is unchecked. In IIS 6 you will only need to specify the path to the aspnet_isapi.dll executable through the wildcard application maps list.

    When you are creating your friendly names make sure that this url does not exist anywhere else in your project. If the url exists, you will get the Violation error you sent us.

    Regards,
    Vassil Daskalov
    the telerik team
2 posts, 0 answered