Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem debugging in interdev

Status
Not open for further replies.

maxpower1

Programmer
Jul 29, 2001
488
US
I have a login.htm page that calls loginsubmit.asp page for input validation(this asp page calls ativexdll that does the
validation).

However, when I click on the login button on the login.htm page, instead of bringing up the loginsubmit.asp page, it
brings up the annoying dialog box that says:

"Would you like to open or save the file?"

I chose open and instead of taking me to the design page, it pops up the codes that exist in loginsubmit.asp? How can
I avoid this annoying msgbox to pop up?

thx

 
The loginsubmit.asp should be the 'action' of the <FORM tag.

I am unsure about this ActiveX DLL that does the validation. What on earth would you need this for? Unless it connects to the database etc. - in which case it should be used in the Server-Side code NOT client side code.

Please include some relevant code from your web pages.
 
the dll talks to global section instead of database. It uses socket to connect to that global task.

I can test the application in a browser without getting the above message,&quot;&quot;Would you like to open or save the file?&quot;
However, when I run it in Interdev, that message popped up.
I have ACTION keyword in the xhtml tag.

Anyway, here are the codes(snipped). thanks! :-

file: login.html

<form NAME=&quot;message&quot; METHOD=&quot;post&quot; ACTION=&quot;loginsubmit.asp&quot;>

<!-- This section displays the user inputs: username and password -->
<label><strong>User Name:</strong></label>

:
: other misc. codes here

<td align=&quot;middle&quot;> <input id=Save name=&quot;save&quot; type=&quot;submit&quot; style=&quot;font-SIZE: medium; WIDTH: 133px; COLOR: black; HEIGHT: 31px&quot; value=&quot; Login &quot; size=29>
</td>



file 2: loginsubmit.asp (the dll is instantiated in the
application_onstart() in global .asa)

<%@ LANGUAGE=&quot;JavaScript&quot; %>

<%
var lInitSys;
var sResponse;

lInitSys = Application(&quot;comObj&quot;);

//retrieve the username and password from the form and pass them
//to the ActiveX dll to be processed
sResponse lInitSys.verifyUserInfo(Request.Form(&quot;UserId&quot;) + &quot;&quot;.toUpperCase(), Request.Form(&quot;Password&quot;) + &quot;&quot;.toUpperCase(), Session(&quot;SessionId&quot;));

if (sResponse == &quot;Success&quot;) {

//get the security level

Response.Redirect(&quot;\main.htm&quot;);
}
else {
Response.Redirect(&quot;\error.htm&quot;);
}

%>
 
Everything appears correct - so forgive my earlier unearthly comment. Do you have other ASP pages in this web, and do they work OK? It looks a bit as though the web is not ASP enabled, or has not been set to 'application' status in IIS (which enables the ASP page enterpreter to execute via MTS). Without this, the ASP page looks like any old text file (like a .doc or .txt file) - and the browser sees it at a download - hence the pop-up dialog.

Load up IIS Service Manager, locate your web, show the Properties dialog. On the Virtual Directory tab, it should have an 'Application Name' entry, with a Button with the words 'Remove'. If the button says 'Create' instead of 'Remove' then the web will not execute ASP pages. Just click the 'Create' button, and re-try your login.

Was this any use? I cannot think of any alternative - even if the DLL causes an error, it should still generate an HTML page, not a download.
 
thanks for your help. I check the virtual web setting and everything seems to be ok. I guess I just have to load up the browser when testing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top