when you designing the pages in vs.net, it uses windows authentication, but when you run the pages on a web server, normally the pages are run under ASPNET account which has limited privileges, try to add ASPNET account to your database, or change the authentication mode in the Enterprise manager for you database to SQL Server and Windows authentication and use a connection string like"data source=HOME-HY\NetSDK;initial catalog=hbhr;UID=YourSQLLoginID;PWD=YourSQLPassword;"or"data source=HOME-HY\NetSDK;initial catalog=hbhr;UID=sa;PWD=;"