Last post Dec 18, 2008 07:43 AM by beast_b9
Nov 30, 2008 08:06 PM|talk2alie|LINK
Nov 30, 2008 10:17 PMemail@example.com|LINK
After that should be pretty simple. If you can connect to the sql server locally and have you aspnet_db installed simply use the database explorer in VWD 2008 to create and save you connection string. Once save your connection string should appear in a file
called the web.config in your website root directory. From there you can use that connection string in any asp.net sqldatasource with
<asp:SqlDataSource id="sqlda1" runat="server" ConnectionString='<%$ ConnectionStrings: <connection string name> %>' SelectCommand="...." />
private SqlConnection myConnnection = new SqlConnection(Configuration.ConnectionStrings["<connection string name>"].ConnectionString);
Sample Web.config Connection String
Catalog=Northwind;Persist Security Info=True;User
Dec 02, 2008 05:11 PM|talk2alie|LINK
Thank you for your response. I tried to follow your explanation, but its like I slipped somewhere and so I am still getting the same message. Here is exactly what I did:
I installed the SQL Server 2008 Express with Advanced Services and set the username to sa and password to VWD@passwd.
Then I installed the VWD 2008 Express Edition. I went to drive c>Windows folder>Microsoft,net folder>framework>v2.0.50727>clicked on aspnet_regsql
A wizard opens. I clicked next; then clicked on Configure SQL Server for Application Services. Then I put in the server name: prospectsacc-pc\sqlexpress. I clicked on SQL Server Authentication; then put in the user name: sa and the password: VWD@passwd;
I then typed in the Database name textbox: aspnet_db and then clicked next.
After doing all the above, I still get the same message.
Dec 05, 2008 08:57 AM|beast_b9|LINK
why don't you try like this , in solution explorer click on app_data nad add new item, select sql database name it and it will add it automatically for local working. In web.config under find the single line
and replace it with
Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"
Database.mdf is name of your database, try and let mi know. Thos is for local, database i you are conecting to remote database of your host provider then go to server explorer and click on add new database: data source : microsoft sql server (sqlclient),
server name: that will give you rpovider as the user name and password, enter the name of you database that provider gave it to you and that should work, write back if not.
Dec 05, 2008 03:29 PM|talk2alie|LINK
Dec 06, 2008 08:49 AM|beast_b9|LINK
No need to help me i am begginer my self:). web.config only showes when you are starting new site, then you got default.aspx (and default.aspx.cs if you working under c# else is...vb)web.config and app_Data (this is where you add new item .sql database).
I am not sure how you set configuratio under 2005 web developer, but i am certain that you are by default able to test all your work in localhost.
Read this: Both
ASP.NET Development Server and IIS (included with the .NET Framework) can serve all ASPX and
associated pages, so at deployment there is no need to make changes to your site. But a number of differences
exist between the servers.
The two servers use different security models. IIS is a service, and every service in Windows requires a
user. The special user for IIS is named ASPNET. ASP.NET Development Server runs as an application
that uses the currently logged-in Windows user. That makes ASP.NET Development Server easier to
install because there is no need to create a specific ASPNET account in Windows. In fact, the installation
of ASP.NET Development Server is transparent when VWD is installed.
ASP.NET Development Server has three downsides. First, it is a tool for designers to test pages on their
development machine and thus it does not scale to more than one user. Second, because of the simplifications
to the user model, ASP.NET Development Server cannot support a robust security scheme.
ASP.NET Development Server should run only in a closed environment or behind a robust firewall.
Third, when you run a page in ASP.NET Development Server, it locks the page back in VWD. In order to
unlock the page, you must close the browser, which can be inconvenient when you’re making and testing
many changes to a site. Therefore, many developers use IIS even on their development machines so
they do not have to close a page in the browser before working on it in VWD. The downside is that you
have to configure your development machine to provide IIS, set up the appropriate authorizations,
establish security controls, and create a virtual root.If you
don’t want to go through the IIS setup, you can still use ASP.NET Development Server and just close the
browser between modifications.
And this is a solution to set up IIS and running vW developer express:
first VW 2005:
This is step from acceptin terms of eulat ( after you clicked accept terms of License agreement in installation),you then specify which installation options you want to
install in addition to .NET 2.0 and Visual Web Developer Express. The only compulsory option for
is SQL Server 2005 Express.. you check - miscorosft SQL server 2005 express edition x86( you can choose also the microsoft MSDN 205 express edition .- whicih is good for using library with help).
Specify where to install VWD,suggest selecting the default, which is
C:\Program Files\Microsoft Visual Studio 8\, and clicking Install to begin the setup. (Don’t
worry if the default is something other than C on your machine—this makes no difference).
At the end of this installation, you should see the screen , asking you to
restart your machine. You should oblige by clicking Restart Now
After your machine has restarted, the dialog box is displayed, notifying
you of a successful install (or any problems that were encountered) and reminding you to register
the software within 30 days.
Click Exit and you will now be able to start up both Visual Web Developer and SQL Express.
Visual Web Developer Express comes with its own web server: the
ASP.NET Development Server, nicknamed Cassini. However, you might want to use IIS anyway.
Note that it isn’t possible to run two versions of the web site concurrently, one on IIS and one on
the development server, because the database attaches itself to the ASP.NET Development Server and
you will find you can’t run it with IIS without detaching the database first.
To use IIS, you must have Windows XP Professional, Windows 2000, or Windows 2003 Server installed.
Windows XP Home Edition comes without IIS, and it isn’t possible to install it on Home Edition if you
do manage to get a copy of IIS. To begin the install, follow these steps:
To install IIS go to the Start menu, navigate to Settings➪Control Panel, and click Add or Remove
Programs. From the left-hand menu of the dialog box , select the
Add/Remove Windows Components icon. This will bring up the Windows Components
Make sure the Internet Information Services option is selected,
Click Details and you can select which of the options to install . You won’t need
all of the options, although you can install them separately at a later point. However, you must
make sure that you select the Common Files, the IIS snap-in, the Front Page Extensions, and the
World Wide Web Services options, because these are necessary to work with ASP.NET 2.0 and
Visual Web Developer Express
Click OK and make sure you have the Windows CD handy for the installation
Adding a alias folder:
From the Start menu, select Run. Type MMC in the text box, and click OK. In the MMC dialog
box that appears, select File➪Add/Remove Snap In. Click the Add button and select IIS Internet
Information Services from the dialog box that appears.
Expand the Internet Information Services, Under that will be your
computer’s name. Expand that as well as the Web Sites option.
Right-click Default Web Site, and select New➪Virtual Directory from the menu to start the wizard.
Type in what you want to call it as the Virtual Directory Name
Click Next and browse to you loacl path of directory you created.
Click next and make sure the box read and run scripts are selected
Click Finish. Close the MMC Console. A save is optional, and you can supply a name if you so
And that covers it, so you don't need to insall iis but if you do and dont want to make virtual directory make sure that all your work is under Inetpub ->wwroot- folder.
Dec 11, 2008 01:53 AM|beast_b9|LINK
Did you make it ?
Dec 11, 2008 05:52 AM|talk2alie|LINK
Dec 11, 2008 12:54 PM|beast_b9|LINK
here are the link of same problem and solution
Dec 11, 2008 09:00 PM|roozbeh_noroozi|LINK
Dec 12, 2008 09:37 AM|talk2alie|LINK
Thank you once again.
I followed all the steps explained and right now I have successfully copied the two files in the App_Data folder and I can see them there right now. I do not have sql server 2008 developer edition but I followed the step in sql server 2005 express edition
and it went well. But I do not know how to "attach aspnetdb database from files to sqlserver" (step 6 in your explanation) and I do not know where I can find machine.config file instance and I do not know how to "change machine.config file instance to false:instance=false"
(next step after step 6 in your explanation). Please help me out.
Dec 14, 2008 03:26 PM|beast_b9|LINK
right click app_data and add existing item (browse to your database that you want to add) in solution explorer you have last icon (hamer and world) asp.net configuration this is where you can configure it.
This is for sql 2005
Dec 14, 2008 03:27 PM|beast_b9|LINK
One more thing when you click debug you will get web config file..
Dec 18, 2008 07:43 AM|beast_b9|LINK