Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Use Web Application on Intranet with UserInteractive mode = true

Posted on 2011-02-11
7
Medium Priority
?
1,706 Views
Last Modified: 2012-05-11
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?
0
Comment
Question by:jriggin
  • 4
  • 3
7 Comments
 
LVL 1

Author Comment

by:jriggin
ID: 34872389
Correction: Application was built with Visual Web Developer Express, but I have VisualStudio2008 Pro available.
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 34872718
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.
0
 
LVL 1

Author Comment

by:jriggin
ID: 34872944
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.
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 1

Author Comment

by:jriggin
ID: 34872954
of course when I said "... on a trusted internet" I meant Intranet -- on same subnet as IIS.
0
 
LVL 29

Expert Comment

by:Paul Jackson
ID: 34873094
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 ?

0
 
LVL 1

Author Comment

by:jriggin
ID: 34873347
Page load event.
0
 
LVL 29

Accepted Solution

by:
Paul Jackson earned 1000 total points
ID: 34873406
OK so in the example above what you would probably have is a button or menu item on the page to give the user an option to create an invoice rather than prompting them to do it. You would then detect the click event of that button and create your new invoice.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question