Trouble Deploying ASP.NET Application

F

fenway

Hi,

I'm new to ASP.NET and just finished up a small application.
Essentially it's just a form that writes data to a CSV file on the
server after a user fills in the form. The code compiles and runs on
my development machine (VS.NET 2002) but when I FTP all the files to
the server I get a "Server Error in '/' Application." error. I can't
figure out why it won't run. A couple notes:

~ I have no idea of the server settings. It's a clients machine and I
was only told it is a .NET machine.

~ I can't seem to change the Cusomt Error Message in web.config even
though I change the XML, recompile the code and FTP it to the server.

~ This code is residing in a sub-directory of the main web application.

~ I've tried deleteing web.config and Global.asax to see if that would
help but no luck.

Any help would be appreciated,

(e-mail address removed)
 
K

Kevin Spencer

Man, you are in a true pickle, Justin.

Let me venture a guess. Under your circumstances, about the only thing you
could do would be a trace IN the page, which you might try, but I sure
wouldn't like to have all the constraints on me that you have, especially if
I was new to .Net!

You say it writes to a file. Therefore, the account under which it is
running must have permission to write to the folder in which the file
resides. My guess would be that it is running under an underpriveleged
account, but you will need to find this out somehow.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Sometimes you eat the elephant.
Sometimes the elephant eats you.
 
F

fenway

Hi Kevin,

Thanks for your response. I'm in the process of stepping throught the
file line by line trying to find what's throwing the error.

I agree, it may be a permissions issue with the CSV file.
Unfortunately getting ahold of the sys admin is a time consuimg process
and the only access I have to the server is FTP access.

Justin
 
F

fenway

So I've been trying to debug a bit and I've found something
interesting. I added a blank ASPX page to my project. This file has
absolutely nothing in it excep a Response.write() call. But if I
compile the project, FTP it to the server and then try to load this
ASPX page I still get the generic "Server Error in '/' Application".

Any thoughts? I could really use a hand.

Thanks,

Justin
 
F

fenway

Is there anyone out there that can offer a little help re: this issue?
I have a small web app that compiles and runs on my machine but will
not run on the server after I FTP it to the server. Even the simplest
pages throw a "Server Error in '/' Application." error.

I've tried tweking web.config to display a more robust error but that
is not working.
 
M

Mark Fitzpatrick

First, if it is in a subdirectory off the main application you must make the
sub-directory it's own application. Otherwise the files in the bin directory
aren't paid attention to since they aren't in the bin directory for the main
application. To make a directory into an applicaton you open the IIS MMC and
select the properties for the particular directory and on the Directory tab
click the button that says Create Application.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
F

fenway

THANK YOU!!!! Once I get ahold of the sys admin that's what I'll tell
him to do. I had read some similar things but was unsure if I needed
to make this sub-directory it's own application. Now I know the
answer. Hopefully that works.

Question, is there a way to create ASP.NET code that plugs into the
existing application without having to modify any settings in IIS? It
would be great if I could just drop this code on the server and have it
run "inside" the current application.

Thanks,

justin
 
J

Juan T. Llibre

re:
Now I know the answer. Hopefully that works.

Shouldn't you test that it works BEFORE saying that you know the answer ?

re:
It would be great if I could just drop this code on the server
and have it run "inside" the current application.

As long as you drop the code in a subdirectory of your
application's directory, everything should work fine.
 
F

fenway

True, I should test it before stating that it works.

So, If I'm reading your note correctly, I should be able to drop my
application in a sub-folder of an existing application and it should
run correctly? I tried that and got an error. Plus I tried to change
web.config to display a more verbose error message but it's still
display the friendly error message.
 
J

Juan T. Llibre

re:
I should be able to drop my application in a sub-folder of an
existing application and it should run correctly?

That's not what you asked.

You asked if you could drop *code* in a sub-folder
of an existing, and whether it would run correctly.

It *will* run correctly, if you drop it as *code*.

What you are attempting to do is *nest* applications, which since
ASP 1.0 has been *verboten* ( forbidden ), because it leads to
*kaput*, i.e., the end of your application.

If you want a different application, create a different application.

If you want a sub-application, just run it in a sub-directory of your main application.
You don't have to run a sub-application as a *different* application.

If you do, that application won't be able
to share any values with your main application
 
G

Guest

One thing to note is that if you use VS.NET to create a ASP.NET web
application its forcing your project to become a virtual directory and it
treats is as 1 appliation. Now if you are uploading a folder to a already
working web app then you gotta check few things:

1. The .dll that VS.NET creates cannot be in the bin folder subdirectory
that you are uploading. The .dll file should be placed in the root directory
of your already working website. You can only place the .dll in the bin
folder within a sub directory if that directory is a virtual directory.

2. VS.NET creates a web.config file with standard elements that you would
find in a asp.net app defined as a virtual directory. Please be mindful that
there are certain elements that can only be declared at the machine level or
at the virtual level and NOT at the subdirectory level. So, check your
web.config file that vs.net creates for you and make sure elements like
<session>, <authentication>, I think thats it, are removed from the
web.config file since they can only be declared for a folder that is a
virtual directory..which your directory is not.

See if any of these helps. This is something I have to go through with
Virtual Hosting companies all the time.
 

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,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top