Hi my application is MVC, have a view with windows media player, it plays on my local host but not on the hosting server, MIME is set up correct.
Here is my script:
<object codebase="http://www.apple.com/qtactivex/qtplugin.cab"
classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject">
<param name="url" value="../../Video/1.wmv"/>
<embed src="../../Video/1.wmv"
type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>
I tried same script in a simple HTML file, it worked well on the server.
I get 500 Internal Server Error (shown in Fiddler). Any suggestions.
Try using a helper:
<param name="url" value="#Url.Content("~/Video/1.wmv")" />
<embed src="#Url.Content("~/Video/1.wmv")"
This will ensure that a correct url to the video file is generated. In this example I suppose that you have a Video sub-directory and the file is inside this directory.
As far as the 500 error is concerned, I suppose it is not related to the code snippet you have shown. Try looking at the server's EventLog where unhandled exceptions are traced.
Related
I have two Dialogflow agents, each one has been tested and working independently. Now I want to be able to call agent1, then pass the caller to agent2, do more processing, then pass the caller back to agent1 with the new data that agent2 had collected.
I want to leverage the Avaya-provided technology as much as possible.
Avaya Experience Portal v8.1.1
Google Dialogflow CX agents
I've tried this with a vxml subdialog (using Avaya's default/sample apps as reference) but I can't figure out how to change agent1's Conversation Profile Automated Agent string to instead be the one for agent2.
I've also thought about using one of the dialogflow API's but haven't used them before so not sure their capabilities.
Is a plain phone transfer an option in this case? Not sure how the data would get passed if I did.
Here's the form of my vxml code:
<form id="invokemainmenu">
<property name="com.avaya.asr.vendor" value="dialogflowasr"/>
<subdialog name="dialogflowapp" src="http://localhost/mpp/misc/dialogflowapp/AuthIVR811.vxml">
<param name="calledAsSubDialog" value="true"/>
<param name="sipInfoFromParent" expr="session.connection.protocol.sip"/>
<filled>
<!-- once the subdialog has been filled(completed and returns), we pass control to a different form -->
<goto next="#invokeagent2"/>
<form id="invokeagent2">
<property name="com.avaya.asr.vendor" value="dialogflowasr"/>
<subdialog name="dialogflowapp" src="http://localhost/mpp/misc/dialogflowapp/AuthIVR811.vxml">
<param name="calledAsSubDialog" value="true"/>
<param name="sipInfoFromParent" expr="session.connection.protocol.sip"/>
<filled>
<!-- process data here? -->
<prompt bargein="false">
<audio src="http://localhost/mpp/misc/dialogflowapp/prompts/test/DialogflowFinished.wav"/>
</prompt>
I have a simple Cordova application, where when built, and running as a Windows UWP application, has ajax calls are somehow being blocked my work network.
I have asked this many times before, but thought would try to reword, as have never got any solutions.
The application ajax calls work fine on my home machine, or whats seems to be most other networks. When it works, I can see all the output in Wireshark
When on my work machine, connected to our work Network, I see absolutely nothing in Wireshark. If I point to a server running on localhost, the app does work (but I see nothing in Wireshark, but perhaps this is because it is localhost)
If I run the app outside of the UWP container, ie I just run on the same machine, on the same network, but via the desktop browser (as you do for Cordova to debugging), it also works fine.
So it appears to be blocked before it even gets to the Network, as we see nothing in Wireshark at all, so this rules out host not reachable, CORS etc as it hasn't even been sent to the server.
I can run this in debug via Visual Studio, and I run the following test code...
document.addEventListener('deviceready', callUrl, false);
function callUrl() {
console.log('callUrl');
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
var DONE = 4; // readyState 4 means the request is done.
var OK = 200; // status 200 is a successful return.
console.log(xhr.readyState);
if (xhr.readyState === DONE) {
if (xhr.status === OK)
console.log(xhr.responseText); // 'This is the returned text.'
} else {
console.log('Error: ' + xhr.status); // An error occurred during the request.
}
}
xhr.open('GET', 'https://httpbin.org/get');
xhr.send(null);
};
onreadystatechangeis called twice, with xhr.readyState first 2 and then 4.
status is always 0.
How can I diagnose what is blocking this?? I have absolutely no idea. This is something low level, but how to see what? I have also looked through Windows Event logs, but can find nothing.
The Ajax call just returns 0 with a blank description. Our Network administrator just says there is something wrong with my app (I have tried multiple Cordova apps, including just basic test apps)
Thanks in advance for any help.
[EDIT1]
In response to the comment from #Xavier, all I have in my AppxManifest.xml (that I extracted from my built .appxupload file) is
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
There is some documentation on the capabilities here, where we have the following (right at the bottom of the page)..
The following capabilities are unavailable when deploying your Remote Mode application to the Windows Store:
Enterprise Authentication (enterpriseAuthentication)
Shared User Certificates (sharedUserCertificates)
Documents Library (documentsLibrary)
Music Library (musicLibrary)
Pictures Library (picturesLibrary)
Videos Library (videosLibrary)
Removable Storage (removableStorage)
Internet client/server (internetClientServer) - note that internetClient is still permitted
Private network client/server (privateNetworkClientServer)
I am not sure were we even set these in Visual Studio (config.xml), but also the above seems to be saying some of these can't be used?
Should the internetClient be enough (I only want to call out to a server as a client, not act as a server).
Also, this seems to be enough to work on most Networks except for my Work..
[EDIT2]
In response to the reply on the CSP...
There is a discussion on this here. The test Cordova app I created in Visual Studio does have this :
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
Surprisingly, I don't see this in my Ionic index.html, but perhaps this is because it is using the white list plugin?
My Ionic application has the following in the config.xml
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-navigation href="http://localhost:8080/*" />
....
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
It would be great if the ajax even had some error saying it was something to do with CSP if that is what it is, but we just get nothing.
Once again, it is weird that the problem only occurs on my work network (either on cable or our WIFI). If I run the exact machine (e.g. a Surface tablet)over another connection (e.g. tether it to my phones cell), then all works as expected. So it must be some setting to do with the network (or firewall maybe), which also I find strange as surely I would at least then see something in Wireshark.
Would be great to be able to "debug into" the ajax call, and see where it is failing.
[EDIT 3]
After reading one of the comments, I used fiddler to see if I could see anything, which I do...
It even reports 200 (which is not correct), my request still fails.
According to this, you need to request the privateNetworkClientServer capability in order to communicate with a local network.
Note that this capability only works if you app is configured for local mode (your app will be rejected from the store if using this capability in remote mode).
To enable local mode, you need to set <preference name="WindowsDefaultUriPrefix" value="ms-appx://" /> in your cordova config.xml.
Note that local mode might lead to other issues, as you cannot use e.g. inline scripts in local mode (CSP violation)
I have a NPAPI plugin (built using firebreath) which works fine Safari and Google Chrome (both on Mac); But it fails to work on Firefox.
When I looked at the Firefox plugins (about:plugin) it correctly shows my plugin name and version and shows it as Enabled.
Following is the code I use to load the plugin in javascript -
<object name="fp" type="application/x-myplugin" width="0" height="0">
<embed name="jsPlugin" id="jsPlugin" width="0" height="0" type="application/x-myplugin">
</embed>
</object>
And I use this plugin as follows -
function PluginVwersion(){
var jsPlugin = document.getElementById('jsPlugin');
jsPlugin.GetScannerDetails();
}
But whenever I test this code in firefox, it doesn't work, and I see following error in the Error Console -
Error: jsPlugin.GetScannerDetails is not a function
Source file: file:///Users/u162794/Desktop/test.html
Any help is appreciated.
Regards,
Yogesh Joshi
Why exactly are you trying to use an embed tag inside an object tag? Remove the embed tag, set your object tag id to jsPlugin, and then try it.
<object id="jsPlugin" type="application/x-myplugin" width="0" height="0"></object>
Also try using the example FBControl.htm file that is created in the build/projects//gen folder in your project like is suggested on the FireBreath website.
I'm having a simple but still very annoying issue and i have no idea where to start looking. Its a website i've been taking over and it crashes hard right away when opening in IE8 version 8.0.6001.18702.
The site is http://www.dhf.dk/DHF.aspx and i have to suspect some invalid manipulation of DOM but i like i said i have no idea where to start looking.
Error message is
AppName: iexplore.exe AppVer: 8.0.6001.18702 ModName: mshtml.dll
ModVer: 8.0.6001.18975 Offset: 00067838
I suspect the object-embed code to be faulty but im not hardcore enough in html to be sure if its the case
<object id="DhfSlideshow" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="610px" height="417px" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="/Frontend/Flash/slideshow.swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="wmode" value="transparent" />
<param name="flashvars" value="dataUrl=/Frontend/DHF/DHF.Widget.Slideshows.Album/Server/DHF.Widget.Slideshows.Album.ashx?albumId=a68eae5f-955b-4ba0-aa11-6e4d68ead5df&color_scheme=/red/flash/&overviewUrl=s" />
<embed align="middle" wmode="transparent" width="610px" quality="high" height="417px" pluginspage="http://www.adobe.com/go/getflashplayer" loop="false" name="DhfSlideshow" type="application/x-shockwave-flash" flashvars="dataUrl=/Frontend/DHF/DHF.Widget.Slideshows.Album/Server/DHF.Widget.Slideshows.Album.ashx?albumId=a68eae5f-955b-4ba0-aa11-6e4d68ead5df&color_scheme=/red/flash/&overviewUrl=s" play="true" allowScriptAccess="sameDomain" src="/Frontend/Flash/slideshow.swf"></embed>
</object>
It turned out that all the other templates for the website had a <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> tag on them, and correctly... after inserting on the frontpage as well the page rendered in IE without crashing.
I can't even begin to imagine where to look, so i'll guess that has to wait until a makeover at some point.
I've moved an application from WebForms in .Net 3.5 to .Net 4. The only change was to the web.config to remove the 3.5 extensions, since they are part of .Net 4 now.
I have the following applet tag (Persists software JUpload control) in a site securied using FormsAuthentication and a custom principal:
<APPLET
id="UploadCtl"
CODE="persits.transfer.gui.UploadUI.class"
ARCHIVE="JUpload.jar"
WIDTH="99%" HEIGHT="200"
NAME="JUpload" MAYSCRIPT="yes"
>
<PARAM NAME="cabbase" VALUE="JUpload.cab" />
<PARAM NAME="UseSockets" VALUE="false" />
<param name="DNDOverrideEnabled" value="true" />
<PARAM NAME="ShowTransferButton" VALUE="false" />
<PARAM NAME="AllowAddFiles" VALUE="true" />
<param name="AllowRemoveFiles" value="true" />
<param name="UploadURL" value="/site/manageDocumentsPost.aspx" />
<param name="FinalURL" value="/site/manageDocuments.aspx" />
<PARAM NAME="DebugInformation" VALUE="true">
<param name="MaxFileSize" value="2500" />
<PARAM NAME="Cookie1" VALUE="ASP.NET_SessionId=<% =SessionId %>">
<PARAM NAME="Cookie2" VALUE="<%=FormsCookieName %>=<%=FormsCookieValue %>">
</APPLET>
Basically the control will post to the url specified in UploadURL. The two cookie parameters are there to ensure that the user's SessionId and FormsAuthTicket are sent by the upload applet when doing the post.
As I stated, this works perfectly in .Net 3.5 (CLR 2.0). Moving to .Net 4, CLR4, what seems to happen is that the request for /site/ManageDocumentsPost.aspx gets redirected to the logon page, and the control then displays this assuming the upload went fine. The post page never actually executes it's code though (and the post should return nothing, thus causing the control to ask for the FinalUrl).
Using Fiddler I can see that the manageDocumentsPost causes a redirect, and this redirect has a different Asp.Net SessionId.
Any ideas what might have changed to cause this? More importantly, any ideas to get it functioning again?
Thanks
Andy
Ok, I figured out how to get this working.
previously I was storing the principal in session, and loading in the AquireSessionState event.
Now I store the principal in the cache during logon and write some information into the ticket to allow me to locate it in the cache.
In the AuthenticateRequest event, if the user is authenticated I can easily find the actual principal and get it from the cache. For some reason though the control causes this event to fire unauthenticated, but the session and formsauthcookie are both present in the request. I decrypt the auth cookie, and then use the information in the ticket to find the principal again.
In this way the user is authenticated by the end of the event handler, and everything can proceed normally.
Hope that helps someone else.