How to do configure web.config in IIS6?

atulmodi
atulmodi used Ask the Experts™
on
We have created a website into Virtual Directory of IIS 6 and when we are trying to connect to the database than it is not fetching the data from the database.

so when i try to log to the website then it doesnt goes and validate the password with the database.

Sir, urgent help is required.

I have Attached 3 files with this question.

note: It was working previously but something gets bungled and due to that we are unable to access that server computer which runs locally on our premises for development doesn't serves the file with the data into the grids. so we are unable to find or fix this problem.
Login.aspx
Login.aspx.cs
web.config
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
We need more info about the issue, does the application raise any error or you just receive Authentication failed please verify your loggin details message?

On the other way your code is suffering of SQL injection, try to login using a username containing ' and see what happens.

Author

Commented:
madgino

I would like to know that where can i look for the error file.

I am trying to search that file but i couldn't find it. I have also said we don't get any on-screen error so what should we do and where should we look into windows XP machine for the log file which contains and error.

Commented:
So by looking at your config file you have custom errors off, this means that if there is any error it will be displayed on the page.
What happens when you try to login? Do you get 'Authentication failed' message?

Do you have Visual Studio, can you try to debug the project?
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Hi,
Check if you are able to access the SQL server from your local machine Using UNC path -- \\servername and using SQL Management Studio.
If you are not able to access the same then there is some change in the security of Sql server.

Open the [project in Visual Stuido, Debug and let us know on which line your are getting error and post the error here.

Commented:
You are going to have to post the error message you get.  The code seems sound enough to work.  The only thing is the virtual directory thing.

You have to have the root directory of the site as an application and that would be where the main web.config goes.  If you have a virtual directory under that, you can have a web.config, but mostly that would be to have <location> tags for security or other things.  You could not duplicate the AppSettings, etc.

So without the error, it will be hard to help on this one.

Author

Commented:
Sir,

sorry for late reply, actually i was trying to get or generate some errors. which i am attaching here with this attachment.

kindly have a look at the same.

Please advice asap.
error-ms-iis6.txt

Commented:
Hi, this log is not helpful, is still not clear to me what exactly is not working:
- is the login page loading or not?
- if yes, when you type username and password and submit what happens?
You are getting 400 bad request for your page.

400 Bad Request

The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
Check the link mentioned.

http://www.checkupdown.com/status/E400.html

http://pcsupport.about.com/od/findbyerrormessage/a/400error.htm

Check the sitename you have given in your IIS.
And the same name should be given in the Host file of your system.

If you have given any Port no then you need to add that too in the URL.

Author

Commented:
To madgino:

Login page is loading from the network or from the server.

But when submitted with username and password than it gives the error.

"Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack."

this I get.


To, darjimaulik

For port no. by default it is 80 - when we have placed the website into the c drive

when we have created e-timekeeper as a virtual direcotry it can be accessed from
http://dotnetserver/e-timekeeper.
Hi,
For the error check this.

http://forums.asp.net/t/984756.aspx/1

Author

Commented:
darjimaulik

this what you said is CSV export related issue is there.

Our is login related issue is there.

Atul
The article suggest a similar case.

Do you have any response.redirect code in your block then  

Make second argument of response.redirect(url,false);

Most of all the googled result suggest this.

Commented:
Can you post a print screen with the error, is there a line of code where the error is raised?
Commented:
actually i had to register iis from command prompt

so I had been to Start > RUN >  CMD

than i ran command as below

aspnet_regiis -i and than i rebooted the machine

than everything started fine.
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial