Solved

Use Web Application on Intranet with UserInteractive mode = true

Posted on 2011-02-11
7
1,453 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now