Strange webserver behaviour

R

RasmusKL

I'm currently starting my first asp.net 2.0 app, and doing so on my
current webhotel proved to be somewhat of a challenge.

First I thought I had a problem with references, since it gave an error
when I added LuaInterface.dll and tried using it:

"CS0246: The type or namespace name 'LuaInterface' could not be found
(are you missing a using directive or an assembly reference?)"

I then proceeded to create an App_Code folder, make a custom class
(Class1) and use that in on my Default.aspx page (code-behind)... Same
result:

"CS0246: The type or namespace name 'Class1' could not be found (are
you missing a using directive or an assembly reference?)"

....

Now all these things work fine if I run it locally on my own computer.

Furthermore, I also noticed I had to do quite a few changes to the
standard provided web.config file (created when you run the first
time). If I create a standard WebSite project (HTTP) and just try to
run it out-of-the-box (f5), it gives the following error:

"Unable to start debugging on the web server. Logon failure: unknown
user name or bad password. See help for information."

However, I was never asked about login credentials when trying to run -
but the user/password for logging on the server were correct when I
created the project (and the files are actually on the server).

Alright. Running without debugging (ctrl-f5) works. However, I have to
set customErrors to "off" in the web.config file and comment the
<authentication mode="Windows"/> out for the whole thing to work.

But then, if running in HTTP mode, it's unable to add references or add
classes to App_Code, since it can't create a _vti_cnf folder, which
apparently already exists on the server. Argh! This works in FTP mode
though, strangely.

If I create a project that works perfectly locally and copy it up to
the webserver, I get exactly the same problems.


Does anyone have any idea of what's wrong - might be a trivial problem?


Frustrated thanks,
- Rasmus.
 
G

Gaurav Vaish \(MasterGaurav\)

However, I was never asked about login credentials when trying to run -
but the user/password for logging on the server were correct when I
created the project (and the files are actually on the server).

Check the "Security" options in IIS. It seems there is some
misconfiguration.
But then, if running in HTTP mode, it's unable to add references or add
classes to App_Code, since it can't create a _vti_cnf folder, which
apparently already exists on the server. Argh! This works in FTP mode
though, strangely.

What do you mean by "running in HTTP mode"?
_vti_cnf folder... forget about frontpage extensions, you don't need
them with VS2005.
If I create a project that works perfectly locally and copy it up to
the webserver, I get exactly the same problems.

Regarding your assembly-reference problem, just ensure the following:

1. You have a bin folder (you can right click on the project and select "Add
an ASP.Net Folder" -> "Bin").
2. The assembly exists in the bin folder.
3. There is a reference to the assembly in the <compilation> sub-section in
<system.web> section in web.config.



--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.org
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------
 
R

RasmusKL

Answers embedded.

Gaurav Vaish (MasterGaurav) skrev:
Check the "Security" options in IIS. It seems there is some
misconfiguration.



My problem is that this not my webserver, I don't have access to IIS
settings, but I wanted to check if I was doing something wrong before
contacting the webhosting company.


What do you mean by "running in HTTP mode"?
_vti_cnf folder... forget about frontpage extensions, you don't need
them with VS2005.



I mean when creating the project, selecting either HTTP, FTP og
FileSystem. I get different errors with FTP and HTTP modes connecting
to the project.


Regarding your assembly-reference problem, just ensure the following:

1. You have a bin folder (you can right click on the project and select "Add
an ASP.Net Folder" -> "Bin").
2. The assembly exists in the bin folder.
3. There is a reference to the assembly in the <compilation> sub-section in
<system.web> section in web.config.



My local copy works fine without a reference in the web.config. But the
other two are fullfilled.


--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.org
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------


Thanks Gaurav :)
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top