Link to home
Start Free TrialLog in
Avatar of atulmodi
atulmodiFlag for India

asked on

How to do configure web.config in IIS6?

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.
Avatar of madgino
Flag of Romania image

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.
Avatar of atulmodi



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.
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?
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.
Avatar of DBAduck - Ben Miller
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.

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.
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.

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.
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
For the error check this.

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

Our is login related issue is there.

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.
Can you post a print screen with the error, is there a line of code where the error is raised?
Avatar of atulmodi
Flag of India image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.