Re: SQL Server connection string works with IIS 5.1 but not IIS 6 in ASP.NET
From: Carl Prothman [MVP] (carlpr_at_spamcop.net)
Date: 08/14/03
- Previous message: John Kennedy: "Re: SQL Server connection string works with IIS 5.1 but not IIS 6 in ASP.NET"
- In reply to: John Kennedy: "Re: SQL Server connection string works with IIS 5.1 but not IIS 6 in ASP.NET"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 13 Aug 2003 17:15:52 -0700
"John Kennedy" <jfk@geopraxis.com> wrote
> I was able to solve the problem with help from MSDN support.
>
Cool! I'm glad to hear that you got it solved!
> One of the items I tried earlier actually fixed the issue what kept it from
> working is that I was editing my connection string on this test page in the
> actual *.vb file on the server. This sort of edit requires a recompile which
> I did not realize. I recompiled and updated the bin\*.dll file and it was
> solved. Made the change in the actual app's web.config file and it worked.
>
Correct, use the web.config for all your configuration needs...
> I was using old asp file habits of editing code on the server that is
> implemented immediately. Not so with ASP.NET. I wish MS made that a clear
> distinction in their What's new marketing. None of our developers realized
> that. BIG difference between asp and asp.net.
>
Yup, if you stay with the code-behind model (which is the default in Visual
Studio .NET), then you will need to recompile the DLL if you make changes
to the code-behind.
However, you can use in-line code (e.g. download Web Matrix from
www.asp.net). If you add a button to the form in that tool and double-click
on it, then it creates in-line code (at the top of the aspx file). You can then make
changes to the in-line code in the ASPX file (since it gets compile at run time)
without having to recompile any DLL. Food for thought... ;-)
-- Thanks, Carl Prothman Microsoft ASP.NET MVP http://www.able-consulting.com