Trying to create my first ASP.Net application

F

Frank Wilson

Tom,

It sounds to me like ASP, not ASP.NET is handling the
request for WebForm1.aspx. This is most likely an IIS
config issue that may have been caused by order of
installation or reinstallation, or possibly even
something that happened in IIS before .NET was
installed.

Here is a way to prove or disprove my theory:

Look at the properties on the virtual directory in IIS
that Visual Studio created for you when you created your
project. On the Virtual Directory tab, click the
Configuration button in the Application Settings
section. You should see the Application Configuration
window popup. On the Mappings tab, find .aspx in the
column on the left and highlight that row. Click the
Edit button to see the details.

What you should see, if setup correctly, is the
Executable Path pointing to aspnet_isapi.dll. You should
also see the following verbs listed: GET,HEAD,POST,DEBUG.

If that is not setup correctly, then you can either
manually fix it, which I would not recommend (because
there are many other dependencies that could be out of
sync), or you can reinstall just the .NET Framework
components. I'm not positive that reinstalling will fix
it, but it's a good place to start.

hth,
Frank
-----Original Message-----
Hi

I am trying to create my first ASP.Net application.

I have done a full reinstall of .Net and followed the instructions in the
readme on the .Net CD and I have IIS running.

I have created a new solution called Test02 and it automatically has a
WebForm called WebForm01.


I added no controls to the WebForm but immediately hit F5 to compile it and
got the following message:

Error while trying to run project: Unable to start debugging on the web
server. Server side-error occurred on sending debug HTTP request.


If I do a debug.Start Without Debugging then it brings up a web page which
says:

The page cannot be displayed
Error Type:
Active Server Pages, ASP 0221 (0x80004005)
The specified 'Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb"
Inherits="Test02.WebForm1"' option is unknown
or invalid.
/Test02/WebForm1.aspx, line 1


The HTML looks like this:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="Test02.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>WebForm1</title>
<meta name="GENERATOR"
content="Microsoft Visual Studio.NET
 
T

Tom Wild

Frank,

Thank you very much, it would appear that your theory is correct.

Prior to doing a complete reinstall of VB.Net I had gone into IIS and seen
there was no .aspx on the Mappings tab. I thus added one manually, in
retrospect perhaps not such a good idea.

Given the cause of the problem, I have tried manually editing the .aspx row
on the Mappings tab and things now work a whole lot better. I still can't
debug but if I use debug.Start Without Debugging it seems to work fine and
brings up a web page with controls in the right spot and everything.

If I try and debug (i.e. press F5) I get the following message:

Error while trying to run project: Unable to start debugging on the web
server. You do not have permissions to debug the server.
Verify that you are a member of the 'Debugger Users' group on the server.

Does this mean I really do need to do yet another complete reinstall or is
there a way I can get the permissions I need?

Thanks again

Tom
 
T

Tom Wild

By the way I've gone into Administrative Tools> Computer Management and Tom
Wild (user name) is a member of the Administrators group and the Debugger
Users group.

Tom
 
T

Tom Wild

Hi Frank

One more thing I've just discovered; When I try and access a database
through the WebForm it gets the following error when I try to make the
connection:

The Microsoft Jet database engine cannot open the file
'C:\VB.NET\GizmoVII\GizmoVII.mdb'. It is already opened exclusively by
another user, or you need permission to view its data.

This is despite the fact that if I create a connection object in the design
window and then hit the test connection button it says that connection works
fine.

Is there some permissions thing I'm supposed to set up?

Tom
 
T

Tom Wild

Hi Frank

Have done another reinstall of .Net Framework, VS.Net and IIS and I can now
debug a WebForm

The only problem still remaining is that I cannot seem to access a database
from the WebForm

I am trying to connect to an Access database and I keep getting the error
message:

The Microsoft Jet database engine cannot open the file
'C:\VB.NET\GizmoVII\GizmoVII.mdb'. It is already opened exclusively by
another user, or you need permission to view its data.

I have tried changing the permissions on the folder but it doesn't seem to
work. Have also tried creating a brand new database from scratch but that
doesn't seem to work either.

Any suggestions would be much appreciated.

Regards

Tom
 
T

Tommy

What does your connection string look like?

An ASP.NET web application runs under the "ASPNET" user, which by
default will not have access to your database. You will need to either
add the "ASPNET" user to your Access database, or create a database
user, and specify it in your connection string.

Tommy,
 
T

Tom Wild

Hi Tommy

My connection string is:
Provider=Microsoft.Jet.OLEDB.4.0;Password="";User ID=Admin;Data
Source=C:\Test03\Test03.mdb;Mode=Share Deny None;Extended Properties="";Jet
OLEDB:System database="";Jet OLEDB:Registry Path="";Jet OLEDB:Database
Password="";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mode=1;Jet
OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet
OLEDB:New Database Password="";Jet OLEDB:Create System Database=False;Jet
OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on
Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet
OLEDB:SFP=False

The two things you suggest make sense but I'm not sure how to do them.
1. How do I add a user to my Access database? I've tried changing the
permissions on the folder that the database is in but that doesn't seem to
work.

2. How do I create a database user and specify it in the connection string?

Please excuse the possibly stupid questions

Regards

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top