Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i publish a sql server db on iis?

Status
Not open for further replies.

DoubleV

Programmer
Jan 11, 2002
358
US
i installed sql server 2005 express on my computer. created a database. how do i publish this database on iis now (like does it have to go into a specific directory etc)?
when i open the database using sql server management studio, it doesn't even ask me for a password. so when it is published, how do i connect to it?
we're moving away from the PHP-MySQL-FreeBSD world into MS, so I am totally new to this. thanks!

--------------------------------------------------
Goals are dreams with deadlines
-------------------------------------
 
IIS will not “publish” a Database. IIS will handle a request from a web site and may pass this request to SQL-Server if it involves data set to be returned. There are two common ways to get data from SQL-Server using HTTP based connection. The first, in case of .NET code, is to write ASP.NET page that using ADO.NET to connect and retrieve code from SQL-Server. The credentials you will use to access the server need to be provided in the connection string of the connection object of ADO.NET. To familiarize your self with this approach, follow any tutorial about the subject (C# Step By Step is an excellent one)

The second approach is to use the internet as WAN and connect directly to SQL-Server using its IP address and retrieve whatever data you want.

Keep in mind that the two approaches are not mutually exclusive, you can, for example, submit the ASP/ADO.NET request to IIS and IIS will connect to a SQL-Server in another country using the Internet TCP/IP to retrieve your data


Walid Magd (MCP)

The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity.
-Grady Booch
 
Best place to start when wanting to publish MS SQL data is They have lots of examples. Just cut and paste the code samples and change the connection string. Don't forget to give the user you are using in the connection string access to the database and the table, view or stored procedure.
 
I understand about ASP(.NET) for communication with the database. but right now I can't even place the db on iis. I'm trying to copy the .mdf file onto the directory of the iis, but the system tells me that the file is in use and cannot be copied although I have nothing else but Windows explorer running on my machine.

--------------------------------------------------
Goals are dreams with deadlines
-------------------------------------
 

[COLOR=red yellow]I understand about ASP(.NET) for communication with the database[/color]. but right now I can't even place the db on iis. [COLOR=red yellow]I'm trying to copy the .mdf file onto the directory of the iis[/color].

And you still "think" that you understand the architecture??!!!
Ok, Whatever you say

Walid Magd (MCP)

The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity.
-Grady Booch
 
No, I don't think I understand much. And I am not trying to pretend like I do. BUT I am trying to learn. And your last response have surely been very helpful. Thank you.

--------------------------------------------------
Goals are dreams with deadlines
-------------------------------------
 


I meant no offence man (or mam), forgive me if any taken. In my first post, I explained that what are you trying to do is not right and I said why as well as explaining how to do it in term of which piece is in charge of what job. You replied by a post with its first half contradict the second. If you do understand ASP.NET (stuff) why you trying to copy the mdf files to IIS?. Only SQL-Server can handle this proprietary format, it is not HTML or any other extension that can be handled be IIS.

Again, I apologize if I offended you.


Walid Magd (MCP)

The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity.
-Grady Booch
 
ok. i re-read your initial post and looked at asp101 web site (it had problems when I went to look at ot earlier today). i'll try again and see if it works.

--------------------------------------------------
Goals are dreams with deadlines
-------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top