473,783 Members | 2,563 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.net application SQL Server Access Denied Help!

Hello all, first time posting here and I am running into a pickle of a
problem. Here is the scenario. I have a Windows 2000 server running
IIS and an ASP.net C# application. The application talks to a MS SQL
server on the same box. I have the connection string:

myConnection = New System.Data.Sql Client.SqlConne ction("user
id=sa;password =sa;Initial Catalog=Mainten ance;Data Source=WebServe r")

This works just fine on the machine and all is well. I have installed
SQL MSDE, and all the other things on a Windows XP box and have changed
the data source name to comply with that system name and everything
works. Now here is where the problem is.

I have yet 2 more systems and when I try to install the same thing and
change the connection string I get "SQL Server does not exist or access
is denied" So to get test the "does not exist" part I wrote a small
VB.net app that opens the database using the same connection string and
this works. So it must be the ASP part. I have added both ASP and
IIUsr to the database user group and given them dbo permissions and full
rights to check that but I still get the same issue. I have sql
auditing enabled but it doesn't seem to give me what account is trying
to log in. I also have it set for mixed authentication. So with all
this info, is there anything glaringly obvious that would be why it
works on 2 but not another 2? Are there any group policies I can check
that limit IISusr or Aspnet user? Thanks in advance,

-Will

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #1
1 1295
Hi Will:

There is nothing obviously wrong in your description. Since you are
specifying a user id and password, the ASPNET and IUSER_* account
settings should not have any effect. Have you stepped through the code
in a debugger to make sure the connection string at the time the
connection is opened is what you expect? Can you ping the DataServer
and make sure there is network connectivity?
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 26 Apr 2005 10:06:03 -0700, William Urban
<wi********@yah oo.com> wrote:
Hello all, first time posting here and I am running into a pickle of a
problem. Here is the scenario. I have a Windows 2000 server running
IIS and an ASP.net C# application. The application talks to a MS SQL
server on the same box. I have the connection string:

myConnection = New System.Data.Sql Client.SqlConne ction("user
id=sa;passwo rd =sa;Initial Catalog=Mainten ance;Data Source=WebServe r")

This works just fine on the machine and all is well. I have installed
SQL MSDE, and all the other things on a Windows XP box and have changed
the data source name to comply with that system name and everything
works. Now here is where the problem is.

I have yet 2 more systems and when I try to install the same thing and
change the connection string I get "SQL Server does not exist or access
is denied" So to get test the "does not exist" part I wrote a small
VB.net app that opens the database using the same connection string and
this works. So it must be the ASP part. I have added both ASP and
IIUsr to the database user group and given them dbo permissions and full
rights to check that but I still get the same issue. I have sql
auditing enabled but it doesn't seem to give me what account is trying
to log in. I also have it set for mixed authentication. So with all
this info, is there anything glaringly obvious that would be why it
works on 2 but not another 2? Are there any group policies I can check
that limit IISusr or Aspnet user? Thanks in advance,

-Will

*** Sent via Developersdex http://www.developersdex.com ***


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
9893
by: Dionísio Monteiro | last post by:
Hi there, After Installing IIS on a WinXP Pro machine, I have copied one of my web site files to test it on that machine. I have created a virtual directory, and when I try to access the site on http://localhost/website. When I try to load any ASP page, I get the following error: "Server Application Error The server has encountered an error while loading an application during the
6
2050
by: Dean R. Henderson | last post by:
I have a DTS Package I am able to execute successfully from a Windows Form application, but I cannot get this to work from an ASP.NET Web Service, although the Web Service impersonates the same user the Windows Form runs under. When I run the Web Service, I make a call to "System.Security.Principal.WindowsIdentity.GetCurrent().Name" and this verifies the user-id is the same account I am logged onto when I successfully run my Windows...
4
11134
by: Yohancef Chin | last post by:
Hi, Being fairly new to .NET I am looking for a way to call MS Word from an event on a webform, and after the user is finished save that created document to an SQL Server database. Has anyone done this? Does it seem possible? I followed the instructions from a sample on the Microsoft knowledge base but it only seems to work when creating a VB.NET Windows .EXE, not an VB.NET ASP app.
5
310
by: Martin Robins | last post by:
I have never dabbled with ASP.NET until now so be warned! I have created a web application with the single default form: WebForm1.aspx and when I try to display it I get this error. My understanding was that ASP.NET was supposed to set itself up, especially as I am using Windows Server 2003. Can anybody give me instruction as to resolution; what folder should I be granting the access to? The path shown only exists as far as the...
8
2156
by: Martinh | last post by:
Hi I keep getting this error... Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NETFiles\webservice_isds\f12c6a5a\5975001" is denied. Stack Trace: System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
2
2222
by: Ross | last post by:
Hi I have an application using asp.net that I am running on my PC. The web form has a text box where you can enter a name for a new Photo category then click on the button. The code is intended to create a new directory under Photos such as "Relatives".
5
2048
by: Markus Hopfenspirger | last post by:
Hello, I want to call a Command like winpop add username@domainname /createuser: password From a normal .Net Windows Application this is working without a problem. The same code called from a ASP Net Application or a Windows Service Application is not executed. Also if I do an impersonation to a local admin account before executing the Code.
10
3824
by: Mandy | last post by:
I have a command line tool that I would like to run from my .NET web application using System.Diagnostics.ProcessStartInfo. I run cmd.exe with this and then pass the command to run the tool as an argument to the process. When I try this from a Windows application it works fine, however, when I do this from my web application I get errors. Both applications are running under the same users so am not sure if it is a permissions problem. ...
4
5046
by: casper | last post by:
Hi, I created an asp.net 2.0 website with VWD and made it an application in IIS. It was created on a ntfs disc (my documents...). The directory permissions are set on 'anonymous allowed' using IUSR_MYSERVER, which has read/list permissions to the apllication directory. When i start it from the browser, i get this error: Server Application Unavailable
0
3472
by: anubhavbajpai | last post by:
In regards to the Server Application Error, One may perform the following steps : 1. Restart the IIS Default website. 2. Go to Start -> Run -> type cmd -> On the command prompt, type iisreset <computer name> <computer name> can be seen in "My Computer" Properties 3. Open Control Panel -> Administrative tools -> Computer Management -> Local user and groups -> Users open properties for IWAM_WP3CV970-CLM036 user a) check "Account...
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10315
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9946
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.