473,322 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How do I connect to my database when I'm using IIS (connecting via http://localhost/...)

How do I connect to my application via http://localhost/..., using
IIS.

I've developed an application via the File System (using the VS Web
server). When I deploy it I change the <appSettingsFrom
MyAppConnString_localhost to MyAppConnString_live (see config settings
below).

Up to now connections have worked fine.

I've never developed via IIS but I want to now. That's because I've
noticed that AJAX seems to work differently when the application is
running via the File System (VS Web Server) or IIS.

The problem is that as soon as I run my application, after connecting
via LocalIIS, niether connection string (see below) is valid.

Why not? What do I need to do locally via IIS and/or SQL Server
Express to get this to work (using integrated security). Am I missing
a machine account or user account?

My account is a local machine administrator.

This is the first time I've tried to connect via IIS since I upgraded
using the recent upgrades for Win XP, VS (SP1) and SQL Server Express
(SP2). I'm using VS 2005 Standard and WinXP SP2.
<appSettings>
<add key="connectionString" value="MyAppConnString_localhost"/>
</appSettings>

<connectionStrings>
<add name="MyAppConnString_localdev" connectionString="Data Source=.
\SQLEXPRESS;Integrated Security=True;Initial Catalog=MyApp_40"
providerName="System.Data.SqlClient"/>
<add name="MyAppConnString_live" connectionString="packet
size=4096;user id=AliBaba;data source=.;persist security info=False;
initial catalog=MyApp_40;password=letmein"
providerName="System.Data.SqlClient"/>
</connectionStrings>

Mar 28 '07 #1
1 1919
Make sure Anonymous Access is turned OFF in IIS for this to work, and
Integrated Windows Authentication is turned ON.
To configure this, goto site in IIS, right click->Properties-
>Directory Security->Edit
Latish

Mar 29 '07 #2

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

Similar topics

20
by: Mr Dygi | last post by:
Hi, PHP 4.3.4 installed manually from package *.zip and Apache 2. I have a problem with this simple code: <?php $link = mysql_connect("127.0.0.1","","") or die("Could not connect: " ....
16
by: MLH | last post by:
Using MS Access, I have attached to MySQL servers in other states and other countries on the other side of my router. But when I use the MySQL ODBC driver 3.51 to connect to a MySQL server on my...
4
by: banz | last post by:
Hello I have a problem to resolve: I wrote a Perlscript which caches data from a server (local on my machine) I would like to have a other connection to a remote server but I don't know how to...
0
by: vicky | last post by:
Hello Experts, Trying to run sample Postgrel's ECPG(Embedded SQL)programs on RHL 9.0. Im unable to connect to PostgreSQL database (sirishadb) when I run the program .... # su postgres...
1
by: medvegonok | last post by:
I am trying to connect to MySQL database at on host (DBhost) from another host (PROGRAMhost). While I try to connect to the database at DBhost from DBhost itself the next is working fine for me:...
2
by: comp.lang.php | last post by:
when trying to use the mysql_real_escape_string() function, the following warning occurs: First of all, the user is not 'web' trying to connect to the database, secondly, what is...
3
by: LamSoft | last post by:
I am not going to write a aspx to connect a SQL Server... but it tries to connect the SQL Server... Some of the Code.. protected void LoginButton_Click(object sender, EventArgs e) { if...
3
by: toyin | last post by:
hi, am having problem connecting to MYSQL5.1 from VS.Net.the error is database reeor:System.Data.SqlClient.SqlException:An error occur while establishnig a connection to the server. Am Using Visual...
1
by: servo | last post by:
I created a user "test1" (which then got the username "debscrof_test1" from CPanel), a password for the user "test2", and then added the user to a new database "testdb" with all priviliges Then a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.