Link to home
Start Free TrialLog in
Avatar of Member_2_241474
Member_2_241474

asked on

Use Web Application on Intranet with UserInteractive mode = true

I have a VS2008 web project that I developed on a box with local web server.  I used VB msgbox which causes a "not allowed when userinteractive is false" error.  This application is ONLY running on our intranet.  How can I set userinteractive to true so it works on other clients the way it does on dev box?
Avatar of Member_2_241474
Member_2_241474

ASKER

Correction: Application was built with Visual Web Developer Express, but I have VisualStudio2008 Pro available.
Avatar of Paul Jackson
You can't use msgbox with a web application, are you trying to do this from code-behind ?
An alternative way to do it would be with javascript.
Seems like there should be a setting to allow a web app access to local win32 stuff if on a trusted internet.  I thought that is what the userinteractive setting was all about.

Anyway, there are many msgbox used for branching vb code behind like

        If rs.Tables(0).Rows.Count > 0 Then
            If MsgBox("Invoice " & strInvoice & " was paid on " & rs.Tables(0).Rows(0)("DatePaid").ToString() & vbCrLf & "Would you like to create a new Invoice?", MsgBoxStyle.YesNo, "Invoice Already Paid") = MsgBoxResult.Yes Then
                ss = objInfo.GetNewInvoice(CType(strInvoice, Integer), strConn)
                If rs.Tables(0).Rows.Count > 0 Then
                    strInvoice = ss.Tables(0).Rows(0)("Invoice").ToString()
                Else

I'm not sure how I would even do that in javascript -- I would have to pass stored proc results to the alert() and get a "yes/no" back to the vb.
of course when I said "... on a trusted internet" I meant Intranet -- on same subnet as IIS.
It is not available in a web app as technically web apps don't have an interactive gui. You present the user a form, they fill in the data and post it to the server. The only way to add some interactivity is to use javascript. The way you are coding is how you would code for a windows forms app. Programming a web application is very different.

Is the code shown above in one of your Page events or as the result of a button click ?

Page load event.
ASKER CERTIFIED SOLUTION
Avatar of Paul Jackson
Paul Jackson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial