locked
Error - User does not have permission to perform this action. RRS feed

  • Question

  • User-868167035 posted
    Ok I am at  complete loss on this one, I've done everything I can think of, changed file permissions, even gave everyone full permissions to the app_data folder. The site works fine on my local box, the error occurs when I put it up at webhost4life.com. They seem to have no clue. I even went to the trouble of taking all the aspnetdb.mdf tables/sprocs/views etc and moving them into my personal.mdf and I renamed the personal.mdf, etc. I still get the error posted below, if anyone has a clue please let me know, and thanks.


    User does not have permission to perform this action.

    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: User does not have permission to perform this action.

    Source Error:

    Line 205:			using (SqlCommand command = new SqlCommand("GetNonEmptyAlbums", connection)) {
    Line 206: command.CommandType = CommandType.StoredProcedure;
    Line 207: connection.Open();
    Line 208: List<Album> list = new List<Album>();
    Line 209: using (SqlDataReader reader = command.ExecuteReader()) {
    Tuesday, February 28, 2006 3:21 PM

All replies

  • User-1489493332 posted
    What is the connection string you're using?
    Which plan did you take from webhost4life.com?
    Cheers,
    HS2k

    Tuesday, February 28, 2006 5:11 PM
  • User-868167035 posted
    Since I merged the aspnetdb and the personal db the 2 connection strings are the same now:

    add name="LocalSqlServer"
             connectionString="Data Source=.\SQLExpress;Integrated Security=SSPI;User Instance=True;Initial Catalog=psullyPersonal;AttachDBFilename=|DataDirectory|\psullyPersonal.mdf" providerName="System.Data.SqlClient"
       
    add name="Personal" connectionString="Data Source=.\SQLExpress;Integrated Security=SSPI;User Instance=True;Initial Catalog=psullyPersonal;AttachDBFilename=|DataDirectory|\psullyPersonal.mdf" providerName="System.Data.SqlClient"

    webhost4life plan is the advance plan, says that my asp.net 2.0 stuff is working etc. From their faq docs I added the initial catalog to the connection strings.


    Wednesday, March 1, 2006 10:54 AM
  • User1887545391 posted

    User does not have permission to perform this action.

    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: User does not have permission to perform this action.

    Source Error:

    Line 205:			using (SqlCommand command = new SqlCommand("GetNonEmptyAlbums", connection)) {
    Line 206: command.CommandType = CommandType.StoredProcedure;
    Line 207: connection.Open();
    Line 208: List<Album> list = new List<Album>();
    Line 209: using (SqlDataReader reader = command.ExecuteReader()) {

    AFAIK most online hosts do not directly support sqlExpress databases and XCopy deployment.
    You will probably need to export the express database then reimport it to a WH4L MS SQL2005 DB.

    The following are the databases scripts for the original version

    http://www.microsoft.com/downloads/details.aspx?FamilyId=2EE85ED4-7613-47E2-8375-17222B150E4F&displaylang=en

    Wednesday, March 1, 2006 1:38 PM
  • User-868167035 posted
    They've told me that they do support SQL Express and that it is enabled on my account so..
    Wednesday, March 1, 2006 3:04 PM
  • User595806616 posted

    Here is what I use on WebHost4life. I am on the advanced plan as well.

    <connectionStrings>

    <!-- Connection for SQL 2005 Express -->

    <!--add name="Personal" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"/-->

    <!-- Connection for SQL Server 2005 -->

    <add name="Personal" connectionString="Server=IPAddressOfTheDataServer;user id=YourDBUser;password=DBUserPassword;database=YourDataBaseName" providerName="System.Data.SqlClient" />

    <remove name="LocalSqlServer"/>

    <!-- Connection for SQL 2005 Express -->

    <!--add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|Personal.mdf" providerName="System.Data.SqlClient"/-->

    <!-- Connection for SQL Server 2005 -->

    <add name="LocalSqlServer" connectionString="Server=IPAddressOfTheDataServer;user id=YourDBUser;password=DBUserPassword;database=YourDataBaseName" providerName="System.Data.SqlClient"/>

    </connectionStrings>

    Wednesday, March 1, 2006 4:18 PM
  • User595806616 posted

    Thats strange. They told me they didn't support SQL Express. Only SQL Server 2005 and SQL Server 2000.

    You should Open a support ticket and be very detailed in your descriptions of what help you need. Webhost4life has always been very good about helping me resolve issues.

    Wednesday, March 1, 2006 4:24 PM
  • User-868167035 posted
    lol Jwad, that would make sense if that is the case, I did open a ticket titled "Sql Express" and they didn't say anything about not supporting it though.
    Wednesday, March 1, 2006 4:26 PM
  • User595806616 posted

    Sometimes you have to be very specific with the Webhost4life guys to get a clear answer. I would open a new ticket or if you already have one open. Ask specifically, "Can I use SQL Server Express or do I have to use SQL Server 2005?"

     

    Wednesday, March 1, 2006 5:06 PM
  • User1887545391 posted

    The WH4L hosting ads http://www.webhost4life.com/hosting.asp do mention support for SQL 2005 Express under the advance plan. I think this is likely a fairly new option as I had to manually convert mine to MS SQL2005 a while ago.

    There is an upsizing tool that is available to hosting providers.

    http://weblogs.asp.net/scottgu/archive/2005/10/15/427581.aspx

    Please post the instructions if you get it working on WH4L.

    Wednesday, March 1, 2006 6:06 PM
  • User-868167035 posted
    It appears that the real error, got this after the site was reset and run for the first time, is in named pipes

    System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)
    Thursday, March 2, 2006 2:48 PM
  • User771284268 posted

    Hi Jeremy,

     We are using SQL 2000 instead of SQL 2005 on our servers. How do I configure it to use it with SQL 2000? What is the backup file or mdf/ldf that we could attach to create this database under SQL 2000 server. We are using your customized kit.

     Let me know

    Thanks

    Snehal Rana

     

    Tuesday, March 6, 2007 6:24 PM
  • User595806616 posted

    Snehal,

    My kit doesn't include any SQL 2000 support. In order to use SQL 2000, you will need to create database scripts using SQL Server Management Studio that are SQL 2000 compatible, and then create a database from those scripts.

     

    Tuesday, March 6, 2007 11:42 PM
  • User771284268 posted

    Hi Jeremy,

    If I install SQL 2005 along with SQL 2000 on the same machine will that be a conflict? Also can I use this kit as it is with SQL Express 2005 edition installed on the server will that work. As of now that is how it is and hence getting this error message. What permissions am I missing on SQL Express 2005 as it is already installed on the server. I have also checked the SQL 2005 Express service running so it is running for sure. 

     Please advice.

    Thanks

    Snehal
     

    Wednesday, March 7, 2007 10:57 AM
  • User595806616 posted

    I use SQL Server Management Studio Express to generate scripts. You would be much better off using SQL Express or SQL Server 2005. You should be able to use SQL Express on the server as long as the host server has SQL Express Installed. You’ll need to set the following permissions on folders.

    1. App_Data folder (Read, Write, Modify, for the Network Services account)
    2. Albums folder (Read, Write, Modify, for the Network Services account)
    3. Uploads folder (Read, Write, Modify, for the Network Services account)

     

    Wednesday, March 7, 2007 11:40 AM
  • User771284268 posted

    Permissions are as set correctly, still no luck.

     Thanks

    Snehal
     

    Wednesday, March 7, 2007 11:54 AM
  • User-800406098 posted

    Hi there!

    What you have to do is to add a line in your web.config file.

    Try this inside <system.web>

    <identity impersonate="true" userName="ServerName\login" password="p455w0rd" />

    I hope that I could help you.

    Saturday, June 23, 2007 11:56 AM
  • User1380070032 posted

    Hi there!

    What you have to do is to add a line in your web.config file.

    Try this inside <system.web>

    <identity impersonate="true" userName="ServerName\login" password="p455w0rd" />

    I hope that I could help you.

     

    how about if the website is in a host site?

    we can't use identity impersonate here,

    please help, we also have no luck here

    Sunday, November 16, 2008 5:16 AM