473,586 Members | 2,695 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL logon: aspx fails, winform ok

On Thursday it was working, then something changed and now I can't
access my sql server database from aspx :(

I have simplified my code to a simple connect and query [1] where m_sql,
m_con are text boxes and m_output is a label. It fails when I pass in
either Sql#### or OleDB#### connection and command objects.

Connection strings
Ole Db: Provider=SQLOLE DB;Initial Catalog=dbName; Server=MACHINE; User ID=sa;
Sql : Initial Catalog=dbName; Server=MACHINE; User ID=sa;Integrate d
Security=False;
OleDb error : OleDbException [DBNETLIB][ConnectionOpen
(Connect()).]SQL Server does not exist or access denied. Invalid
connection string attribute
Sql Error : {System.Data.Sq lClient.SqlErro r}
Class: 20
LineNumber: 0
Message: "SQL Server does not exist or access denied."
Number: 17
Procedure: "Connection Open (Connect())."
Server: ""
Source: ".Net SqlClient Data Provider"
State: 0

This same code runs ok as a win form under my own account. The simple
project runs fine from some other machines but not all. Aspx runs as
<MACHINE>\IUSR_ <MACHINE>. I do not remember making and security changes
but obviously must have done.

I assume that there is some sort of security setting somewhere. I am
using the sa account in the demo with no password.

Any hints appreciated.

adam

1]
Public Sub runQuery(ByVal con As IDbConnection, ByVal cmd As
IDbCommand)
Try
m_output.Text = ""
con.ConnectionS tring = m_con.Text
cmd.CommandText = m_sql.Text
cmd.Connection = con
con.Open()
Dim o As Object = cmd.ExecuteScal ar()
m_output.Text = o.ToString()
con.Close()
Catch ex As Exception
m_output.Text = ex.GetType().Na me + vbCrLf + ex.Message
End Try
End Sub
Nov 18 '05 #1
1 1370
adam wrote:
Sql Error : {System.Data.Sq lClient.SqlErro r}
Message: "SQL Server does not exist or access denied."
Procedure: "Connection Open (Connect())."
Source: ".Net SqlClient Data Provider"


Adam,
There can be serveral resons why you are getting that error message..
Check out the following Microsoft KB article for solutions
http://support.microsoft.com/default...b;en-us;328306

--

Thanks,
Carl Prothman
Microsoft ASP.NET MVP

Hire top-notch developers at
http://www.able-consulting.com
Nov 18 '05 #2

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

Similar topics

4
1333
by: A.M | last post by:
Hi, My WinForm.EXE app tries to write a file into network and it failes because it doesn't have permission and I don't know how can I login into network from my application. How can i logon into network from my EXE file? Any help would be appreciated, Ali
2
1036
by: suicidaltendencies | last post by:
I'm getting a logon error when creating my crystal reports. Does anyone know how to solve this Thanks Harold
2
3884
by: Karun Karunakaran | last post by:
Hi, I am using the Crystal Enterprise .NET assemblies to generate and display a crystal report in a webform. This report connects to an SQL server (running locally) using a specific username and password. I use the InfoStore object to query for the report from the CE server (also running locally) and bind it to the CrystalReportViewer...
6
3717
by: Mr Flibble | last post by:
I have a class that has a LogOn method. I'm trying to think what the advantages are two approaches I have. a) Having a bool returned containing the success of the LogOn. b) Raising an exception that should be caught. I thought that exceptions should not really be raised for "expected" things and since passing, say, an invalid password...
0
2640
by: Marty Cruise | last post by:
I successfully deploy my application to 20 domain users. Only one new user is giving me a problem, although he can access all domain resources. When he clicks the installation link on the publish page, Framework 2.0 installs successfully, but then the application installation fails during the "Verifying Application Requirements" process. ...
1
1737
by: Dean Slindee | last post by:
I am writing a windows service that needs to logon to a server to import a file residing on that server. The server is on the local network, but in the dmz. Not sure is the latter makes any difference, but is there a way to programmatically logon to that server with proper credentials with VB code? What's involved? Example? Thanks in...
1
365
by: moondaddy | last post by:
I had to repost this becuase I renewed-changed my msdn alias. Also, the asnwer in the other past did not understand what I'm trying to do, so I'll attempt to clarify. I have a .net 2.0 winforms app that calls a web service which creates creates a GUID and caches it, then passes the GUID back to the winform. then it opens a aspx page and...
4
1722
by: moondaddy | last post by:
I have a .net 1.1 winforms app that calls an aspx page which I need to debug. I also need to start the debugging process from the winform because the winform first calls a web service which passed secure data to the web server and is cached for 10 seconds and returns a guid. when the winform loads, it passes in this guid as a param to find...
1
1690
by: WayneClements | last post by:
Does anyone know why a simple select like : SELECT SettingValue FROM sysCONFIG_SETTINGS WHERE ModuleName = N'ScheduledTask' AND SettingKey = N'Logon' should fail in oracle 10g It fails with 'no such column' It works is I use N'Logonxxx' or 'Logon' And it works in SQL+ and SQL/Developer
0
7836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8199
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. ...
0
8336
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7950
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8212
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...
0
6606
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...
1
2343
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
1
1447
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1175
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.