How to make VS.Net not depend on IIS

Filed under: General — russell @ 4:00 am

I found a good source for how to make Visual Studio web projects without "binding" them to IIS. When a web project is created in .Net it hard codes the pathing and solution to IIS virtual web. WHile certainly nice for deploying it limits the flexibility of moving the project aorund. I found a source for how to stop this by using a class library project. Reference prepared by Fritz Onion.

Disabling source control from .Net Projects

Filed under: General — russell @ 4:00 am

To (permanently) remove a project or solution from source control:

1. In Visual Studio, click File, click Source Control, and then click Change Source Control.

2. In the Change Source Control dialog box, select the project and/or solution you want to remove from source control, and then click Unbind.

3. Delete all solution or project files in the source control database.

4. In Windows Explorer, locate the working directory for your solution/project and then delete all *.scc files.

Note In Visual SourceSafe and many other SCC systems, if other users have checked out the solution/project in the past, even if they have since checked in their changes, the next time they attempt to Get or Check Out the solution/project, they will be prompted to add the items to source control from their working copies on disk. On the SourceSafe team, we call this a “pending add“, which is a little confusing. Anyway, if you want to guarantee that a solution/project is permanently, permanently, permanently removed from source control and will never again re-appear in your database, you should repeat the final step in the preceding procedure for all solution/project enlistees.

To NON-permanently remove a project or solution from source control in Visual Studio, do not complete the final step in the preceding procedure.


Debugging troubles

Filed under: General — russell @ 4:00 am

Whew! Lost several hours today trying to figure out why my machine would not let me debug my .Net application. After lots of googling I stumbled across a great resource. I will share it with you after I explain what was broken for me. Apparently debugging problems are quite common in the .Net environment.

My problem was related to my turning off session keep-alives in my IIS properties (a few days ago so I did not remember that I did it) -- I did this because XP Pro IIS 5.1 has a limitation in the number of connections it will serve and I was running out. Turning that back on fixed my debugging error problem.

Click above or more for many debugging fixes -- Thanks to Min Kwan Park.

A Quick Summary of Transactions in .Net

Filed under: General — russell @ 4:00 am

I found a good article that summarizes the use of transaction very nicely. Quick and fast to get started. Covers using transactions on a dataset and on commands (kind of the same thing).


.Net DB Work should not be so complicated

Filed under: General — russell @ 4:00 am

Database work in .Net may seem complicated. If you are like me and use many of the great .Net info sites like www.asp.net and www.4guysfromrolla.com to "figure out" how to do this stuff, you may find that database work requires a little bit of indirection. To me this seemed powerful because of the benefits of abstraction, but did not live up to the marketed "simplicity" touted by Microsoft.

Here is a sample of how to do the DB work easily (bypassing the dataAdapter, that you often see in samples).

'Get Data From Products Table
Dim sConn As New System.Data.SQL.SQLConnection("server=localhost;uid=sa;pwd=;database=northwind")
Dim sCmd As New System.Data.SQL.SQLDataSetCommand("SELECT ProductName FROM Products",sConn)
Dim ds As New System.Data.DataSet
'Fill The DataSet


Custom Error Page help in .Net

Filed under: General — russell @ 4:00 am

There is a nice way to adjust the errors in your ASP.Net application. You can add custom error as well as disable the errors from being viewed from remote. Click the title of this post for details.