Configuration problem

Last post 03-04-2009, 6:54 AM by mike99c. 3 replies.
Sort Posts: Previous Next
  •  03-02-2009, 4:42 PM 49410

    Configuration problem

    Hi
     
    I've installed the demo
     
    My config files is:
     
    <?xml version="1.0"?>
    <configuration>
     <appSettings>
      <add key="ConnectionString" value="server=(local)\SQLEXPRESS;database=SurfMessenger;uid=test;pwd=test"/>
         <add key="OnlineTimeout" value="300"/>
     </appSettings>
     <system.web>
      <customErrors mode="Off"/>
      <authentication mode="Forms">
       <forms name=".UserManagementASPXAUTH" loginUrl="~/Login.aspx"/>
      </authentication>
      <authorization>
       <allow users="*"/>
      </authorization>
      <trace enabled="true"></trace>
      <sessionState mode="InProc" timeout="20"/>
      <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
     </system.web>
    </configuration>
     
    I'm getting the following error:
     
    Server Error in '/' Application.
    -------------------------------------------------------------------------------
    Configuration Error
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
    Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS
    Source Error:
    Line 7:   <system.web>
    Line 8:    <customErrors mode="Off"/>
    Line 9:    <authentication mode="Forms">
    Line 10:    <forms name=".UserManagementASPXAUTH" loginUrl="~/Login.aspx"/>
    Line 11:   </authentication>

    Source File: C:\Inetpub\vhosts\domain.com\httpdocs\cutechatstandalone\web\web.config    Line: 9
     
    Any advice much appreciated.
  •  03-03-2009, 1:28 PM 49442 in reply to 49410

    Re: Configuration problem

    This error can be caused by a virtual directory not being configured as an application in IIS.


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-04-2009, 12:02 AM 49461 in reply to 49442

    Re: Configuration problem

    Thanks for that.
     
    Now I'm getting this:
     

    Server Error in '/messenger' Application.
    --------------------------------------------------------------------------------

    The SELECT permission was denied on the object 'Users', database 'SurfMessenger', schema 'dbo'.
    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: The SELECT permission was denied on the object 'Users', database 'SurfMessenger', schema 'dbo'.

    Source Error:


    Line 187:    {
    Line 188:     conn.Open();
    Line 189:     Object result = cmd.ExecuteScalar();
    Line 190:     return result != null;
    Line 191:    } 
     

    Source File: c:\inetpub\vhosts\domain.co.uk\httpdocs\messenger\register.aspx    Line: 189

    Stack Trace:


    [SqlException (0x80131904): The SELECT permission was denied on the object 'Users', database 'SurfMessenger', schema 'dbo'.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
       System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
       System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
       System.Data.SqlClient.SqlDataReader.get_MetaData() +62
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
       System.Data.SqlClient.SqlCommand.ExecuteScalar() +137
       ASP.register_aspx.IsUsernameExists(String username) in c:\inetpub\vhosts\domain.co.uk\httpdocs\messenger\register.aspx:189
       ASP.register_aspx.DoRegNewUser(String username, String password, String location, String occupation, String interests, Boolean gender, Int32 age) in c:\inetpub\vhosts\domain.co.uk\httpdocs\messenger\register.aspx:128
       ASP.register_aspx.btnReg_Click(Object sender, EventArgs e) in c:\inetpub\vhosts\domain.co.uk\httpdocs\messenger\register.aspx:220
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
       System.Web.UI.WebControls.Button.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) +33
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746

    I've created a user 'test' in SQL Server and assigned it to the database.
  •  03-04-2009, 6:54 AM 49468 in reply to 49461

    Re: Configuration problem

    Hi there
     
    Think I've got it working now. I didn't have the 'user' set as the database owner.
     
    Cheers
    Mike
View as RSS news feed in XML