Solved

Use Web Application on Intranet with UserInteractive mode = true

Posted on 2011-02-11
7
1,473 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Re-position the objects 7 95
Asp.net mvc foreach 3 32
Any Third party toll for Integrating chat system on ASP.NET ? 2 34
ASP.net Javascript use multiple sliders 2 16
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

929 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

13 Experts available now in Live!

Get 1:1 Help Now