Showing posts with label asp. Show all posts
Showing posts with label asp. Show all posts

Monday, March 19, 2012

Cant drill through from one report to another with report viewer

Hello all,

this is my first post to asp.net!

I am having a problem getting a drill through to work in the web report viewer. In report1 i have a table with groups and on the key field i want to drill down through i right click >properties> navigation and select jump to report. From there I select the predesigned report2 from the list and add the appropriate parameters.

It works fine when i test it in the dev enviroment and when i deploy it to the report server it works fine there. but when I debug and run it through the website itself and go to the report then click on the hyperlink it goes to a "page cannot be displayed' page.

I have been working on this for 2 days googling the heck out of it and testing several scenarios, but to no avail. I'm sure its something stupidly simple.

has anyone else had this problem?

Help!

thanks so much!

HI,CodeSquirrelMonkey:

Make sure you have put the target report in the right place which is defined in the drill through setting.

Second, you can have a try to open the target report directly on the website.

If i misunderstand you about your question, please feel free to correct me and i will try to help you with more information.

I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance

|||

Hi Rex,

Thanks for the response. I did make sure that the drill through report is in the right place and it didnt work on the live site either.

I did get around the problem though. I created an fresh new aspx page and dropped a fresh report viewer on it and tried it again and it works fine now. I did a comparison of the two pages' code and couldnt find anything obvious that could have caused it. It does work fine now.

the only other thing was to make sure that the page_load has an if not ispostback on it so that it would refresh and drilldown properly.

Thanks again

Craig

Sunday, February 19, 2012

cant connect to sql server 2005 from my asp.net application

Hi

I can't connect to sql server 2005 from my asp.net web page. I seem to be able to connect to it when i run the application from within visual studio but i can't connect to it when i run the application from IIS.

I am new to sql server 2005 express so please bear with me.

The error message i get is:

Cannot open database "Vets" requested by the login. The login failed.
Login failed for user 'OSCAR2K4\ASPNET'.

I don't know where this user OSCAR2K4\ASPNET came from but i looked in sql server 2005 and there he is. In the left hand pane I went to Security and then logins and found oscar2k4\asp.net there. I went to the properties for this user and went to User Mappings. There was no tick next to my Vets database so I added one and ran the application from IIS. I also added the user to every single role in the vets database (including dbowner). I also went into the vets database itself and found the oscar/aspnet user and made sure he was added to every role.

I ran the application again. This time i got a lots of different errors. If the page was trying to run a select procedure I got the error user does not have select permission. If the page was running an SP i got the error or user does not execute permission


I have never had this problem before so I don't understand.

Where did this user come from? Was he created automatically when i configured my database for membership and roles? How do i set up this user so he can access the databsae from IIS.

The only way I could get the application to run from IIS was to go to Security - Logins for sql server and add the oscar2k4\asp.net user to the sysadmin role.

I find this very strange. Naturally i don't want to leave oscar2k4 in sysadmin.

Please help :) I can't upload my website until i fix this

Thanks, andrea

<server>\ASPNET is 'ASP.NET Machine Account', one of the access control lists (ACLs) that are set by default on the Machine.config file and the root Web.config file.

What's the OS version (e.g. Window2000 or Xp) of the box? You can take a look at this articlehttp://msdn2.microsoft.com/en-us/library/ab4e6cky.aspx

Thursday, February 16, 2012

Cant connect to SQL server

I have a SQL server hosting version 2005 and support ASP.net 2.0. Evrerything works just fine with other databases. However when I use Web Configure supported in Visual Studion 2005 to define the membership and user control and upload all files and folders to the server. It never works. I says can not connect to SQL server. The help guy from my hosting says it does not support SQL express and they do not support that.

By default the database connection string is configured by SQL express and I do not know how to change it.

Not all, it is said that just upload everything to the server and that's all but it is not that. To work with database I had to use SQL server 2005 to upload the database by using import wizard and import tables into the database folder in my server. Do I need to do them same with membership and role database? I tried but it still says error .

I am just beginer so need help form you, the masters.

The URL show error is www.tinhtran.com/Default.aspx

thanks

Hi,

take a look at this site for connectionstrings. Personally, I find it strange that you don't get the correct connectionstring from the helpdesk.

Grz, Kris.

Cant connect to server !

My project work ok with Asp.net development server, but when i use IIS :

I'm sure i can connect to SQL server by SQL Server Enterprise Manager and my project debug with Asp.net development server ok.

Anyone please help me.

This article should help:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

and if that doesn't then take a look here:

http://blogs.msdn.com/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx

Tuesday, February 14, 2012

Cant connect to remote SQL Server from my ASP.NET 2.0

I’m going nuts and need some help with my ASP.NET 2.0 application which has trouble talking to a remote SQL Server 2000. First, before I describe my problem let me say that everything works perfectly on my XP development workstation when I point to the local SQL Server database. Screens load fine, saves and edits all work perfectly.

Problem is when I connecting to SQL Server on a remote windows 2003 server I get

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Now, I’ve researched this error and have successfully made the following changes to the remote windows 2003 server where the database resides:

1) Added logins for “ASPNET”, “NT AUTHORITY\NETWORK SERVICE”, and “IIS_WPG”. The reason I added NT AUTHORITY is because we plan on deploying this web site to the same windows 2003 server and I understand that IIS6 (on this server) has ASP.NET running as NT AUTHORITY acct.

2) For all the logins above I’ve added them as users to the database and given dbo role.

I still get same login for user null error when attempting to connect from my XP workstation.

Can anyone help?

Hi,

You need to authenticate against the remote SQL server. Do that in your connectionstrong.

Check www.connectionstrings.com

Regards

|||

Thanks, I'm still getting error. I also want to state I am using windows authentication for this web application, and my understanding is ASP.NET is running as NT AUTHORITY (if windows 2003 and IIS 6) or ASPNET(if XP ) is this a correct assumption?My web.config is set to windows authentication.

I looked at connectionstrings.com as you suggested. This is the connection stringI auto created (it seems very consistent w/ examples on connectionstrings.com) using VisualStudio by dragging a table onto a form from the remote server "TESTSERVER" and using the Configure Data Source dialog which creates the connection string automatically. The SQL Database on TESTSERVER is set to mixed mode for both SQL and Windows authentication. Here is the string, do you see any issues?

Data Source=TESTSERVER;Initial Catalog=CompanyDB1;Integrated Security=True.

I get the same error :Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Do you have any ideas on what I'm doing wrong? Why is user null? Should the user be ASPNET or NT AUTHORITY coming from my XP based web server?

|||Where is the SQL server located in?|||

The SQL Server 2000 database is located remotely on machine called TESTSERVER. This is what is in the connection string

(PS - When I want to point locally to my machine "PUU304" I use this connection string which works fine on my machine

connectionString="Data Source=PUU304;Initial Catalog=JBLocalDatabase;Integrated Security=True")

|||Well, using windows authentication for your winxp login is not working. Try to create a user/pass for your database on the remote server|||check the permission of your database|||NT AUTHORITY has dbo rights in the database. Is this the permission you are referring to?

cant connect to my databse in lan

Hi all!

I am using MSSQL 2005 and asp.net .I have made a web application that needs to be run in LAN.The authentication used is windows authentication.The problem is that when in LAN I cannot connect to the database The sqlexception error shows that the connection is closed.Is there any thing that i am missing?Any configurations i need to make??Is this the issue of remote connections?? Please help!!I am new and dont knw much abt it .Thanks!!

Quote:

Originally Posted by dotnetgal

Hi all!

I am using MSSQL 2005 and asp.net .I have made a web application that needs to be run in LAN.The authentication used is windows authentication.The problem is that when in LAN I cannot connect to the database The sqlexception error shows that the connection is closed.Is there any thing that i am missing?Any configurations i need to make??Is this the issue of remote connections?? Please help!!I am new and dont knw much abt it .Thanks!!


yes you have to setup the Security of SQL Server to accept Mix Authentication|||

Quote:

Originally Posted by ck9663

yes you have to setup the Security of SQL Server to accept Mix Authentication


hello !!

Thanks for the reply.But how am i to set it up to accept Mix Authentication?|||

Quote:

Originally Posted by dotnetgal

hello !!

Thanks for the reply.But how am i to set it up to accept Mix Authentication?


open enterprise manager. right click on your server. choose properties. a dialog box will appear. choose Securtiy. on Server Authentication, choose SQL Server and Windows authentication mode|||

Quote:

Originally Posted by ck9663

open enterprise manager. right click on your server. choose properties. a dialog box will appear. choose Securtiy. on Server Authentication, choose SQL Server and Windows authentication mode


thanks!!I did it but dtill the problem persists!!Any idea?

Can't connect to mssql

Hi
I installed ASP and MSSQL(SQL Express Edition, SQL Manager 2005 for SQL
Server Lite).
- ASP is runnig correctly
- With SQL Manager 2005 for SQL I can create Databases and tabels and some
records...
I can not connect from an ASP script (example follows at the end). I've get
an error message in the internet explorer (after loading my asp script):
"Technical Information (for support personnel)
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
user 'sa'.
The user is not associated with a trusted SQL Server connection.
/index.asp, line 22
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET
CLR 2.0.50727)
Page:
GET /index.asp
Time:
Freitag, 29. September 2006, 09:13:42
More information:
Microsoft Support "
I've looked at this site:
http://support.microsoft.com/defaul...kb;en-us;555332 but it
doesn't help me cause I cant find the properties of the Resulution.
I've got no idea what else I can do Hopfully you understanding my crap
english;)
Thanks for helping!
Pascal Suter
By the way I was talking about this asp script:
<% OPTION EXPLICIT %>
<%
'declare the variables
Dim Connection
Dim ConnString
Dim Recordset
Dim SQL
'define the connection string, specify database driver
ConnString="DRIVER=SQL Server;SERVER=localhost\SQLEXPRESS;UID=s
a;" & _
"PWD=;DATABASE=master"
'declare the SQL statement that will query the database
SQL= "SELECT test FROM test"
'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")
'Open the connection to the database
Connection.Open ConnString
'Open the recordset object executing the SQL statement and return records
Recordset.Open SQL,Connection
'first of all determine whether there are any records
If Recordset.EOF Then
Response.Write("No records returned.")
Else
'if there are records then loop through the fields
Do While NOT Recordset.Eof
Response.write Recordset("test")
Response.write "<br>"
Recordset.MoveNext
Loop
End If
'close the connection and recordset objects to free up resources
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing
%>YOu have only Windows Authentication enbaled but you are using a SQL
user in your connection string. Either use integrated authentication or
switch to Mixed mode. More details on that on my website under the
screencasts sections
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
--|||Jens schrieb:

> YOu have only Windows Authentication enbaled but you are using a SQL
> user in your connection string. Either use integrated authentication or
> switch to Mixed mode. More details on that on my website under the
> screencasts sections
Thanks for your help. But it's exactly the same problem like in my link
below. There's a different program then I have. Unfortunatly I can't find
this settings. Probably the not exists? I have really no idea how I can fix
it|||Jens schrieb:

> YOu have only Windows Authentication enbaled but you are using a SQL
> user in your connection string. Either use integrated authentication or
> switch to Mixed mode. More details on that on my website under the
> screencasts sections
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
I've done this change, but if I want login on Microsoft SQL Server
Management Studio Express the login fails. Where can I change/create Login
names and permissions?
thanks for your help
Pascal Suter|||Am I something like a selfentertainer?;) However, I found a solution for my
problem but acutally your link was the key!
great thanks
Pascal Suter|||I am having the same problem, I did look in the registry but did not find
anything that would help me. I wish you would have expanded upon your last
post to explain what you actually did to solve the problem. I think what yo
u
did will solve my problem also.
"Suter" wrote:

> Am I something like a selfentertainer?;) However, I found a solution for m
y
> problem but acutally your link was the key!
> great thanks
> Pascal Suter
>

Can't connect to mssql

Hi
I installed ASP and MSSQL(SQL Express Edition, SQL Manager 2005 for SQL
Server Lite).
- ASP is runnig correctly
- With SQL Manager 2005 for SQL I can create Databases and tabels and some
records...
I can not connect from an ASP script (example follows at the end). I've get
an error message in the internet explorer (after loading my asp script):
"Technical Information (for support personnel)
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'sa'.
The user is not associated with a trusted SQL Server connection.
/index.asp, line 22
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET
CLR 2.0.50727)
Page:
GET /index.asp
Time:
Freitag, 29. September 2006, 09:13:42
More information:
Microsoft Support "
I've looked at this site:
http://support.microsoft.com/default...b;en-us;555332 but it
doesn't help me cause I cant find the properties of the Resulution.
I've got no idea what else I can do Hopfully you understanding my crap
english;)
Thanks for helping!
Pascal Suter
By the way I was talking about this asp script:
<% OPTION EXPLICIT %>
<%
'declare the variables
Dim Connection
Dim ConnString
Dim Recordset
Dim SQL
'define the connection string, specify database driver
ConnString="DRIVER=SQL Server;SERVER=localhost\SQLEXPRESS;UID=sa;" & _
"PWD=;DATABASE=master"
'declare the SQL statement that will query the database
SQL= "SELECT test FROM test"
'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")
'Open the connection to the database
Connection.Open ConnString
'Open the recordset object executing the SQL statement and return records
Recordset.Open SQL,Connection
'first of all determine whether there are any records
If Recordset.EOF Then
Response.Write("No records returned.")
Else
'if there are records then loop through the fields
Do While NOT Recordset.Eof
Response.write Recordset("test")
Response.write "<br>"
Recordset.MoveNext
Loop
End If
'close the connection and recordset objects to free up resources
Recordset.Close
Set Recordset=nothing
Connection.Close
Set Connection=nothing
%>
YOu have only Windows Authentication enbaled but you are using a SQL
user in your connection string. Either use integrated authentication or
switch to Mixed mode. More details on that on my website under the
screencasts sections
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Jens schrieb:

> YOu have only Windows Authentication enbaled but you are using a SQL
> user in your connection string. Either use integrated authentication or
> switch to Mixed mode. More details on that on my website under the
> screencasts sections
Thanks for your help. But it's exactly the same problem like in my link
below. There's a different program then I have. Unfortunatly I can't find
this settings. Probably the not exists? I have really no idea how I can fix
it
|||Jens schrieb:

> YOu have only Windows Authentication enbaled but you are using a SQL
> user in your connection string. Either use integrated authentication or
> switch to Mixed mode. More details on that on my website under the
> screencasts sections
> HTH, Jens K. Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
I've done this change, but if I want login on Microsoft SQL Server
Management Studio Express the login fails. Where can I change/create Login
names and permissions?
thanks for your help
Pascal Suter
|||Am I something like a selfentertainer?;) However, I found a solution for my
problem but acutally your link was the key!
great thanks
Pascal Suter

Sunday, February 12, 2012

Cant connect to membership provider db

I've started developing an ASP.net 2.0 app with VWD Express.

The default membership provider db of SQL Server 5005 Express is not installed on my host servers. So my workaround has been to use a Full blown SQL Server 2005 DB as a custom membership provider declared in web.config.

This works fine on the production server. However, when i try to login from my development app I get Exception # 40 can't connect to SQL server membership provider.. Moreover, my app configuration confirms there is problems connecting to this server in my development environment.


How can I solve this and bring my development app up & running again?

many thanks

If you have access to your Production SQL Server from your development environment, the problem is probably due to your connection string.


For my development, I use SQL Express on my local development box and SQL Server for production. There are two things that you have to do. Keeps separate scripts for changes to the database (from development to production). In addition, a separate web.config for production and development to hold your connection strings.

Cant connect to db after web setup

I have an asp 2.0 app that connects to a database in another city.

When I test this app through VS2005 is connects and works great. After I created a web setup project it goes bad.

I ran the setup on 2 different computers, including the dev machine, both start ok and bring up the applications main menu, but when I choose a menu item that is supposed to bring up a datagrid from the sql server I get an error saying it's not a trusted connection.

Any advice on where I should start looking? It's got me beat.

Thanks.

Hi,

How are you connecting to the remote SQL server DB? Can you paste the connection string from the config file (with changes password, IPs ofcourse)?

Vivek

|||

I've tried these 2 strings and get the same results with each:

connectionString="Data Source=xx.xxx.xx.xxx;Initial Catalog=xxxxxx;Integrated Security=True; provider Name=System.Data.SqlClient"

and:

connectionString="Data Source=xx.xxx.xx.xxx;Network Library=DBMSSOCN;Initial Catalog=xxxxxx;Trusted_Connection=yes;"

providerName="System.Data.SqlClient"

|||

It seems you are trying to connect to a remote DB. You need to check what authentication type is applicable: Sql Server or Windows Integrated. Refer this article on details:

http://builder.com.com/5100-6371_14-6084879.html

HTH,

Vivek

|||Thank you, I will read that tonight and see what I can come up with.

Friday, February 10, 2012

Cant connect remotely to SQL Express on Virtual Private Server

I've just bought a Virtual Private Server Account because I want to host a number of different ASP.NET sites, each backed by their own SQL database. I've downloaded SQLEXPRE.EXE and SQLServer2005_SSMEE-x64.msi to the server and installed the database engine and Management Studio Express on the VPS.

My problem is that I cannot access the SQLEXPRESS on my server from my local machine. The Management Studio Express cannot get logged in. I've used "Surface Area Configuration Manager" to allow "Local and remote connections" using TCP/IP only. I've used SQL Server Configuration Manager" to enable the TCP/IP protocol. After making these changes I've stopped and started the SQL server - and even rebooted the machine. I've created a login "Remote User" for this access. I've added sqlservr.exe as an exception to the firewall.

What else do I need to do? Is there a simpleton's guide to completing this task?

Did you start the sql server browsing service?

http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

Can't connect from ASP.Net 2.0 to SQL2000 after installing SQL2005

Hey guys,
I have a web application in ASP.Net 2.0 that needs to connect to a local
SQL2000 DB. After I installed SQL2005 this web app stopped working. I get
the following inner exception:
{"An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: SQL Network Interfaces, error: 26 - Error Locating
Server/Instance Specified)"}
So after unsuccessfully googling I'm at least pretty sure about the
following: My web app thinks it's talking to a SQL2005 server. That one by
default uses shared memory when local. I think SQL2000 uses TCP/IP.
Who can tell me what I have to do so that my ASP.Net 2.0 web app properly
connects to SQL2000? Among the ideas on Google there were cliconfg.exe,
using <clear /> in the <connectionStrings> area in web.config and a couple
more. But none of them worked.
Thanks a lot, ChristophI'm having a very similar error, only mine connects locally but not remotely.
I was able to change the error slightly by putting the referencing the
database by domain and db, myMachine/myDB.
If it helps I looked at my log and it gave an error of 17187 which seems to
be a file in use, full disk, or low memory. Still researching. If I find it
I'll let you know. If you find the answer would you please post it so I can
try it too?
--
---
Magic is not in the hands of the magician but in the mind of the audience.
Animadverto est verus
"Christoph Wienands" wrote:
> Hey guys,
> I have a web application in ASP.Net 2.0 that needs to connect to a local
> SQL2000 DB. After I installed SQL2005 this web app stopped working. I get
> the following inner exception:
> {"An error has occurred while establishing a connection to the server. When
> connecting to SQL Server 2005, this failure may be caused by the fact that
> under the default settings SQL Server does not allow remote connections.
> (provider: SQL Network Interfaces, error: 26 - Error Locating
> Server/Instance Specified)"}
> So after unsuccessfully googling I'm at least pretty sure about the
> following: My web app thinks it's talking to a SQL2005 server. That one by
> default uses shared memory when local. I think SQL2000 uses TCP/IP.
> Who can tell me what I have to do so that my ASP.Net 2.0 web app properly
> connects to SQL2000? Among the ideas on Google there were cliconfg.exe,
> using <clear /> in the <connectionStrings> area in web.config and a couple
> more. But none of them worked.
> Thanks a lot, Christoph
>
>

Can't connect from ASP app

Hello,
I am experiencing wierd problem:
My SQL server is on one PC, and the (Classic) ASP web application is on
another PC (let's call it AppPC). The code in ASP is trying to connect to
the MSSQL server, using standard OLEDB connection string:

> Provider=SQLOLEDB;Data Source=servername;User
> ID=myuser;password=XXX;Database=TestDB
The ASP code that creates the connection is the following (dead simple):

> var db = Server.CreateObject("ADODB.Connection");
> db.Open(connStr);
The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Serve
r does
not exist or access denied.
The server is set to accept both win authentication and SQL logins. I have
no problem to connect to the SQL server from the AppPC using Enterprise
manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
executed simple dotNET program that uses the very same connection string to
access the DB and retrieve some data. But, from within the ASP app, this
connection string is just not working.
I have tried to connect to another server (hosted on the internet), and I
have no problem with that - so it makes me think there is no problem in my
ASP code. However, the fact that I can connect to the server from the same
PC, using another tech, ie dotNET exe, makes me suspicious that something is
wrong at the client side.
The IIS virtual folder has anonymous access user identification. However, I
don't think this fact has anything to do with the problem - I am not using
win authetification, but crude login/pwd in the connection string.
Now I have no idea where to search next for problem solution. Maybe someone
has any idea?
Thanks,
PavilsUnfortunately, that's one of those errors that can be a lot
of different things. You can start troubleshooting by
referring to the following article:
INF: Potential Causes of the "SQL Server Does Not Exist or
Access Denied" Error Message
http://support.microsoft.com/?id=328306
Don't forget to run through all the routine troubleshooting
as well - try to ping the server from the ASP box, try to
telnet to the listening port on the server from the ASP box,
try creating a TCP IP alias for the SQL Server instance
using the SQL Server client network utility on the ASP box,
try forcing a protocol to use on the client end (in the
connection string you can specify the network library to
use). Also with the connection string, you may also want to
try specifying the IP address (vs server name), Listening
port number.
You can find some of the connection string examples at:
http://www.carlprothman.net/Default...derForSQLServer
-Sue
On Tue, 27 Dec 2005 19:07:02 +0200, "Pavils Jurjans"
<pavils@.mailbox.riga.lv> wrote:

>Hello,
>I am experiencing wierd problem:
>My SQL server is on one PC, and the (Classic) ASP web application is on
>another PC (let's call it AppPC). The code in ASP is trying to connect to
>the MSSQL server, using standard OLEDB connection string:
>
>The ASP code that creates the connection is the following (dead simple):
>
>The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Serv
er does
>not exist or access denied.
>The server is set to accept both win authentication and SQL logins. I have
>no problem to connect to the SQL server from the AppPC using Enterprise
>manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
>executed simple dotNET program that uses the very same connection string to
>access the DB and retrieve some data. But, from within the ASP app, this
>connection string is just not working.
>I have tried to connect to another server (hosted on the internet), and I
>have no problem with that - so it makes me think there is no problem in my
>ASP code. However, the fact that I can connect to the server from the same
>PC, using another tech, ie dotNET exe, makes me suspicious that something i
s
>wrong at the client side.
>The IIS virtual folder has anonymous access user identification. However, I
>don't think this fact has anything to do with the problem - I am not using
>win authetification, but crude login/pwd in the connection string.
>Now I have no idea where to search next for problem solution. Maybe someone
>has any idea?
>Thanks,
>Pavils
>|||Pavlis,
IIS must assign a Windows user account to every request. When you allow
anonymous access to an IIS folder, by default IIS impersonates a
low-privileged account that is created by the IIS installer. Most likely
that account has no network access. You can change the impersonation to any
other Windows account that has network access, e.g. the account that you use
to test with Enterprise Manager and Query Analyzer. You can even create a
Windows account specifically for that purpose, and grant it only the needed
permissions.
Zlatko
"Pavils Jurjans" <pavils@.mailbox.riga.lv> wrote in message
news:OJ5hUewCGHA.2908@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I am experiencing wierd problem:
> My SQL server is on one PC, and the (Classic) ASP web application is on
> another PC (let's call it AppPC). The code in ASP is trying to connect to
> the MSSQL server, using standard OLEDB connection string:
>
> The ASP code that creates the connection is the following (dead simple):
>
> The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Ser
ver does
> not exist or access denied.
> The server is set to accept both win authentication and SQL logins. I have
> no problem to connect to the SQL server from the AppPC using Enterprise
> manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
> executed simple dotNET program that uses the very same connection string
> to access the DB and retrieve some data. But, from within the ASP app,
> this connection string is just not working.
> I have tried to connect to another server (hosted on the internet), and I
> have no problem with that - so it makes me think there is no problem in my
> ASP code. However, the fact that I can connect to the server from the same
> PC, using another tech, ie dotNET exe, makes me suspicious that something
> is wrong at the client side.
> The IIS virtual folder has anonymous access user identification. However,
> I don't think this fact has anything to do with the problem - I am not
> using win authetification, but crude login/pwd in the connection string.
> Now I have no idea where to search next for problem solution. Maybe
> someone has any idea?
> Thanks,
> Pavils
>

Can't connect from ASP app

Hello,
I am experiencing wierd problem:
My SQL server is on one PC, and the (Classic) ASP web application is on
another PC (let's call it AppPC). The code in ASP is trying to connect to
the MSSQL server, using standard OLEDB connection string:

> Provider=SQLOLEDB;Data Source=servername;User
> ID=myuser;password=XXX;Database=TestDB
The ASP code that creates the connection is the following (dead simple):

> var db = Server.CreateObject("ADODB.Connection");
> db.Open(connStr);
The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does
not exist or access denied.
The server is set to accept both win authentication and SQL logins. I have
no problem to connect to the SQL server from the AppPC using Enterprise
manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
executed simple dotNET program that uses the very same connection string to
access the DB and retrieve some data. But, from within the ASP app, this
connection string is just not working.
I have tried to connect to another server (hosted on the internet), and I
have no problem with that - so it makes me think there is no problem in my
ASP code. However, the fact that I can connect to the server from the same
PC, using another tech, ie dotNET exe, makes me suspicious that something is
wrong at the client side.
The IIS virtual folder has anonymous access user identification. However, I
don't think this fact has anything to do with the problem - I am not using
win authetification, but crude login/pwd in the connection string.
Now I have no idea where to search next for problem solution. Maybe someone
has any idea?
Thanks,
Pavils
Unfortunately, that's one of those errors that can be a lot
of different things. You can start troubleshooting by
referring to the following article:
INF: Potential Causes of the "SQL Server Does Not Exist or
Access Denied" Error Message
http://support.microsoft.com/?id=328306
Don't forget to run through all the routine troubleshooting
as well - try to ping the server from the ASP box, try to
telnet to the listening port on the server from the ASP box,
try creating a TCP IP alias for the SQL Server instance
using the SQL Server client network utility on the ASP box,
try forcing a protocol to use on the client end (in the
connection string you can specify the network library to
use). Also with the connection string, you may also want to
try specifying the IP address (vs server name), Listening
port number.
You can find some of the connection string examples at:
http://www.carlprothman.net/Default...erForSQLServer
-Sue
On Tue, 27 Dec 2005 19:07:02 +0200, "Pavils Jurjans"
<pavils@.mailbox.riga.lv> wrote:

>Hello,
>I am experiencing wierd problem:
>My SQL server is on one PC, and the (Classic) ASP web application is on
>another PC (let's call it AppPC). The code in ASP is trying to connect to
>the MSSQL server, using standard OLEDB connection string:
>
>The ASP code that creates the connection is the following (dead simple):
>
>The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does
>not exist or access denied.
>The server is set to accept both win authentication and SQL logins. I have
>no problem to connect to the SQL server from the AppPC using Enterprise
>manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
>executed simple dotNET program that uses the very same connection string to
>access the DB and retrieve some data. But, from within the ASP app, this
>connection string is just not working.
>I have tried to connect to another server (hosted on the internet), and I
>have no problem with that - so it makes me think there is no problem in my
>ASP code. However, the fact that I can connect to the server from the same
>PC, using another tech, ie dotNET exe, makes me suspicious that something is
>wrong at the client side.
>The IIS virtual folder has anonymous access user identification. However, I
>don't think this fact has anything to do with the problem - I am not using
>win authetification, but crude login/pwd in the connection string.
>Now I have no idea where to search next for problem solution. Maybe someone
>has any idea?
>Thanks,
>Pavils
>
|||Pavlis,
IIS must assign a Windows user account to every request. When you allow
anonymous access to an IIS folder, by default IIS impersonates a
low-privileged account that is created by the IIS installer. Most likely
that account has no network access. You can change the impersonation to any
other Windows account that has network access, e.g. the account that you use
to test with Enterprise Manager and Query Analyzer. You can even create a
Windows account specifically for that purpose, and grant it only the needed
permissions.
Zlatko
"Pavils Jurjans" <pavils@.mailbox.riga.lv> wrote in message
news:OJ5hUewCGHA.2908@.TK2MSFTNGP09.phx.gbl...
> Hello,
> I am experiencing wierd problem:
> My SQL server is on one PC, and the (Classic) ASP web application is on
> another PC (let's call it AppPC). The code in ASP is trying to connect to
> the MSSQL server, using standard OLEDB connection string:
>
> The ASP code that creates the connection is the following (dead simple):
>
> The error I get is "[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does
> not exist or access denied.
> The server is set to accept both win authentication and SQL logins. I have
> no problem to connect to the SQL server from the AppPC using Enterprise
> manager, Query Analyzer, etc, using the same user/pwd. I also succesfully
> executed simple dotNET program that uses the very same connection string
> to access the DB and retrieve some data. But, from within the ASP app,
> this connection string is just not working.
> I have tried to connect to another server (hosted on the internet), and I
> have no problem with that - so it makes me think there is no problem in my
> ASP code. However, the fact that I can connect to the server from the same
> PC, using another tech, ie dotNET exe, makes me suspicious that something
> is wrong at the client side.
> The IIS virtual folder has anonymous access user identification. However,
> I don't think this fact has anything to do with the problem - I am not
> using win authetification, but crude login/pwd in the connection string.
> Now I have no idea where to search next for problem solution. Maybe
> someone has any idea?
> Thanks,
> Pavils
>