ASP.NET 4.0
I've checked that using both or control (which is a wrap of html file input) will display "C:\fakepath\MyFile" in both Google Chrome 12.0 and IE8.0 on my Windows 7. It only displays "MyFile" in FF3.6. I am trying to not display "C:\fakepath\" string since it's not usual to most users.
I already enabled displaying full path in IE security setting which mentioned in another SO thread, so that shouldn't be just an IE security issue. Not to mention GC is showing fakepath too.
I am more suspecting it's because of my compilation environment -- Windows 7 + VS2010 SP1 + MVC3 installed. Can the community tell me how to disable this?
It can't be disabled, it's a browser security feature. It ensures the server doesn't have access to any file information on the client. Some browsers handle it differently, which is why in FF you just see the file name.
See this related question:
Javascript loading clients local media
Related
I came across below question where the solution for IE 8 is provided.
Call .Net assembly from OBJECT tag in IE8
Is there any solution or workaround for the Object tag code for Microsoft Edge browser. The .net application is built in .Net 2.0 Framework. it is working fine now till IE7, but as Internet Explorer browser might be removed it should get rendered on Microsoft Edge.
ExamineFile.dll is a dll of class library containing a Windows Form and related source code.
<object id='ExamineFile' name='ExamineFile' classid='ExamineFile.dll#ExamineFile.FileInfo' ></object>
UPDATE
I updated HTML to HTML 5 and modified tag as below
<object id='ExamineFile' name='ExamineFile' data='ExamineFile.dll#ExamineFile.FileInfo' type='application/x-msdownload' ></object>
I am getting below result now.
Based on my research, it was possible to do with the older versions of the IE browser.
It is not possible to call .Net assembly from the Object tag in the MS Edge browser.
I did not get any direct workaround for the said requirement.
If your goal is to make a connection between the web application and .Net assembly then you can try to check WebView2 and Getting started with WebView2. It may help you with your issue.
In the Asp.net MVC project when using Chrome doesn't wait the method return in debug mode, but when I run in IE,MS Edge debug performe well. I verified the javascript debug option was cheked in VS. It was working before, I don't know if there was a VS update that could have caused it. Do you have
Visual Studio 2017 Version 15.9.17
Google Chrome Version 84.0.4147.89 64 bits
Asp.net MVC project when using Chrome doesn't wait the methods return
in debug mode
Please try the following steps:
1) close VS, delete .vs hidden folder under the solution folder, bin and obj folder
2) delete all caches under C:\Users\xxx\AppData\Local\Microsoft\VisualStudio\15.0_xxxx\ComponentModelCache
3) Try to reset vs settings by Tools-->Import and Export settings-->Reset All settings--> General.
And if your VS has any other extensions, pleaese disable them under Tools-->Extensions and Updates
After that, check Enable Javascript debuggigg for Asp.Net(Chrome,Edge and IE) option
4) enable all options under Tools-->Options-->Debugging-->Just-In-Time
5) try to clean Chrome caches and then test again.
If it still does not help, please try to reset settings in Chrome.
Besides, you could try to restart your PC.
I created an application using sapui5.I am using sapui5 library 1.40 in server NW7.4 sp6. This application working fine in chrome.
If I open this application in new Tab of IE11. It's working fine but when I am trying to call inside Portal iView. sapui5 library is not loaded, due to this my application is giving error "sap is undefined".
Please find attached document of screenshots for the reference. I have attached console log of the browser as well.
Thanks in advance
The Portal isn't able to run SAPUI5 iView that don't run with the standards mode. SAP provides a lot of documentation through SAP note and SDN blogs about that but the one that could help you the most might be the following:
https://blogs.sap.com/2014/09/03/ie-and-portal-standardsquirks-mode-evolution-or-love-hate-relationships/
To sum it up, your SAPUI5 iView must run with NavMode 10 ("Standard headerless framework page"), this should enable edge document mode, be careful that the entreprise mode for IE11 is not activated otherwise edge mode won't be usable.
Hope this will help you.
I have a web app using validation control such requiredvalidator. When I run it from VS 2008 directly, it worked perfectly (validated the missing input). But the moment I published it to IIS, it does not validate it anymore..
any ideas?
thanks
Use firebug or IE8 built in web developer toolbar to see if the scripts get downloaded for the validation to run. Also check if the generated client id equals the one that is used to set up the validation (javascript at the bottom of the generated html).
Apparently this is a common problem with asp.net. found the solution from here: http://www.velocityreviews.com/forums/t92775-asp-net-client-validation-not-working.html
We have an advanced webpage (ASP.NET, C#), and a application which needs to be installed on the client computer in order to utilize the webpage to its fullest. The application is a tray app, and has primarily two tasks. Detect when certain events happen on the webserver (for instance invited to a meeting, or notify of an upcoming meeting). The other task the trayapp has is to use a custom protocol (trayapp://) to perform some ajax calls back to the server.
One problem we have is how to determine if the application is installed on the local machine or not. Now the user has to tick a checkbox to inform the website that the application is installed, and that it's safe to call the trayapp:// url calls.
Is there any way, for instance through a JavaScript or similar to detect if our application is installed on the local machine?
The check needs to work for IE, FF and Opera browsers.
When installing your client-side app you could modify the browser configuration to include another request header in HTTP requests and then have the server code look for that header, for example as a supported mime type using the following registry key (for Internet explorer)
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
Internet Settings\Accepted Documents
I am not sure if Opera and FF use this same key, but they likely have similar configuration options, but this should at least get you on the right track.
If you want to detect with javascript inside the browser, you can probably use the collection "navigator.plugins". It works with Firefox, Opera and Chrome but unfortunately not with IE.
Update:
In FF, Opera and Chrome you can test it easily like this:
if (navigator.plugins["Adobe Acrobat"]) {
// do some stuff if it is installed
} else {
// do some other stuff if its not installed
}
Update #2:
If it is an ActiveX object in IE you can test if it exists by using something like this:
function getActiveXObject(name){
try{
return new ActiveXObject(name);
}
catch(err){
return undefined;
}
};
Another approach for IE is something similar to what JohnFx suggested (I found it here and have not tested it):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Internet
Settings\User Agent\Post Platform
Good idea from #JohnFx.
Another way to tackle this would be to install an ActiveX control or Browser plug-in with the trayapp installation. You could then access this in a similar way to that done when checking the version of Flash available.
Expose the trayapp (assuming this as a Managed app) as COM object. You could then use the tag with the GUID and trap errors when not found or use the ActiveXobject with the progid to detect if it's installed.