Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL Server Connectivity

SQL Server Connectivity

Scheduled Pinned Locked Moved Database
databasehelpquestionsql-serversysadmin
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    Zafar Sultan
    wrote on last edited by
    #1

    I am using SQL Server 2005 for my web application.The Database I am using is located on a remote server and I am accessing the database from my local Machine.I have used stored procedures for all the database operations.When I was running my application(On my IIS) i.e., localhost, it was working fine, so I uploaded all the compiled pages to the web server.Now the pages which don't require database operations are working fine but whenever database connectivity is required an application runtime error is occuring.Someone told me to grant permissions to the users/guests for the stored procedures and I did the same.The problem is when permission link is clicked there are 4 database objects to be selected Administrator, Dataadmin, guest and whbuser.I want to know what permissions should be given to which one?I granted permissions to first 2 objects but its still not working.What could be the solution so that the database may be used by the site's users for their respective purpose?What is the complete procedure to make a remote database work with front end successfully?Thanks..

    C 2 Replies Last reply
    0
    • Z Zafar Sultan

      I am using SQL Server 2005 for my web application.The Database I am using is located on a remote server and I am accessing the database from my local Machine.I have used stored procedures for all the database operations.When I was running my application(On my IIS) i.e., localhost, it was working fine, so I uploaded all the compiled pages to the web server.Now the pages which don't require database operations are working fine but whenever database connectivity is required an application runtime error is occuring.Someone told me to grant permissions to the users/guests for the stored procedures and I did the same.The problem is when permission link is clicked there are 4 database objects to be selected Administrator, Dataadmin, guest and whbuser.I want to know what permissions should be given to which one?I granted permissions to first 2 objects but its still not working.What could be the solution so that the database may be used by the site's users for their respective purpose?What is the complete procedure to make a remote database work with front end successfully?Thanks..

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      zafar sultan wrote:

      When I was running my application(On my IIS) i.e., localhost, it was working fine

      Localhost could also refer to the built in webserver inside Visual Studio. This doesn't use IIS and it will run with YOUR permission set, not that of the webserver. Are you absolutely use it is your local IIS?

      zafar sultan wrote:

      Someone told me to grant permissions to the users/guests for the stored procedures and I did the same

      Blindly granting access to stuff really blows holes in your security. Please think about what you are doing with that regard and think about what is actually happening when you do these things. If you don't understand then please get a good book on .NET web application security.

      zafar sultan wrote:

      permission link

      Permission "link"? Are you configuring your database through a web site? (e.g. Your hosting provider). If that is the case then I cannot tell you what they have set up. What does your connection string connect to the database as? That will point you in the right direction as to what permissions you need to be changing.

      zafar sultan wrote:

      What is the complete procedure to make a remote database work with front end successfully?

      That depends on your set up.

      Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Crazy Extension Methods Redux * Mixins My Blog

      1 Reply Last reply
      0
      • Z Zafar Sultan

        I am using SQL Server 2005 for my web application.The Database I am using is located on a remote server and I am accessing the database from my local Machine.I have used stored procedures for all the database operations.When I was running my application(On my IIS) i.e., localhost, it was working fine, so I uploaded all the compiled pages to the web server.Now the pages which don't require database operations are working fine but whenever database connectivity is required an application runtime error is occuring.Someone told me to grant permissions to the users/guests for the stored procedures and I did the same.The problem is when permission link is clicked there are 4 database objects to be selected Administrator, Dataadmin, guest and whbuser.I want to know what permissions should be given to which one?I granted permissions to first 2 objects but its still not working.What could be the solution so that the database may be used by the site's users for their respective purpose?What is the complete procedure to make a remote database work with front end successfully?Thanks..

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #3

        I got this part message in my email...

        zafar sultan wrote:

        No it is not the built in web server(SQLEXPRESS) that i am using i am using a remote database which I created on a remote server(from my web hosting service provider).It is created successfully and can be accesed if i use my application from my machine(localhost).The only problem is my application can not access the database when it is accesed through web browser.What could be the reason and how it can be solved? This was my connection string When it was not working i changed it to But it is still no...(continued)

        If you have solved your problem let others know as it helps them if they have the same problem, don't just delete messages.

        Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Crazy Extension Methods Redux * Mixins My Blog

        Z 1 Reply Last reply
        0
        • C Colin Angus Mackay

          I got this part message in my email...

          zafar sultan wrote:

          No it is not the built in web server(SQLEXPRESS) that i am using i am using a remote database which I created on a remote server(from my web hosting service provider).It is created successfully and can be accesed if i use my application from my machine(localhost).The only problem is my application can not access the database when it is accesed through web browser.What could be the reason and how it can be solved? This was my connection string When it was not working i changed it to But it is still no...(continued)

          If you have solved your problem let others know as it helps them if they have the same problem, don't just delete messages.

          Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Crazy Extension Methods Redux * Mixins My Blog

          Z Offline
          Z Offline
          Zafar Sultan
          wrote on last edited by
          #4

          Actually I submitted the wrong query string so I deleted the message and was trying to write the new one when the connection disturbed.Sorry for that. This was my connection string <connectionStrings> <add name="myconnectionstring" connectionString="Data Source=xxx.xxx.xxx.xxx;Initial Catalog=mydatabasename;User ID=databaseuser; Password=mypassword"/> </connectionStrings> When it was not working i changed it to <connectionStrings> <add name="myconnectionstring" connectionString="Data Source=xxx.xxx.xxx.xxx;Initial Catalog=mydatabasename;User ID=databaseuser; Password=mypassword; User Instance=True"/> </connectionStrings> and its still not working.My problem is not solved. And by permission "link" I mean the option given by SQL Server Management Studio(After right clicking the stored procedure and then clicking on properties)Thats where I had to provide database objects and permission for each of them(Control,Execute,Write and so on)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups