Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Use Web Application on Intranet with UserInteractive mode = true

Posted on 2011-02-11
7
1,507 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
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

 
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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 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