can I use silverlight to overcome activex issues in chrome? - asp.net-mvc

I have a phone caller id device. I want to record calling numbers to database. I used javascript and Activex but that only works in IE. I am using MVC and EF.
Is it possible to use Silverlight and embed it to my web application project so that the silverlight project can access to database and record the phone number.
If it is possible, can you show me a simple example pls?
(i created a project on Silverlight but cannot add dlls(caller id device SDKs) to references.)

You don't explain why you are using ActiveX so I assume the control is able to provide an interface to your hardware phone caller ID device.
Silverlight could possibly solve your problem. However, if you have to call native code (e.g. a COM object to access the phone ID device) you will have to run the Silverlight application as a Trusted Application. In general this requires the application to be run Out Of Browser (OOB). This makes the browser only be a vehicle for installing the OOB Silverlight application.
You will also have to create a web service interface allowing your Silverlight application to interact with the database. You cannot just add references to Entity Framework in your Silverlight project and then access the database directly. However, using WCF RIA Services it is reasonable simple to connect your Silverligt application to Entity Framework hosted in IIS.

Did you try using "ActiveX for Chrome" extension?
https://chrome.google.com/webstore/detail/lgllffgicojgllpmdbemgglaponefajn

Related

Integrate WPF application into web application

Can a web application be integrated with WPF application. If there is a link in web application(ASP.NET MVC 5 in my case) which opens up the WPF application from my local machine, it should be great.
Requirement goes similar to something like gotomeeting where I click on a link(from web) and it opens up my locally installed gotomeeting.(Or launching my skype application from a link in web). In case the WPF app is not installed on local machine, it downloads the exe. In case the WPF app is updated, it updated the local app.
Checked ClickOnce on the WPF application, but somehow does not work as expected. The "launch" link in the publish.html works only with IE.
Can anyone please suggest me something to get started. If any articles or links are present, please post it here. I have gone through numerous links but did not get something which is extremely relevant.
Thanks,
Sam.
One of the things about web pages are in the browser in a security sandbox.
It is intentionally difficult for them to just "reach out" onto your machine and run some exe or other.
If your machine already has an application associated with a particular file extension then you can get it to do it's default action when such a file is delivered.
Like open a mail object in outlook.
To run an exe from a web app you'd have to rely on a custom file extension and deliver a file that the machine "knows" means run wpf application xyz.
Clickonce is likely to be problematic if you're passing objects in because it installs to the user's appdata. You can't predict where it will be.
Just running one works from a url, but to start up with an object out a page sounds like it could be problematic. I never tried it though.
You could conceivably make your wpf app an xbap. http://www.xbap.org/ That's wpf in a browser.
Or there is of course still Silverlight. I think that still goes out of support in 3 years and you're probably now limited to IE as well.

Error running powerbuilder .net assembly in IIS wit ASP.NET MVC app

i got a Powerbuilder (12.5) .net assembly application which dll generated is referenced by an ASP.NET MVC application.
Basically, ASP.NET call to PB assembly NVO function with some parameters, then PB retrieves data from DB (SQLServer) through a dataStore and then saves it as PDF, then returns the name of PDF file to ASP.NET MVC app and then Web application send PDF file to user for downloading.
In local PC it works nice.
but when i deploy into web server it fails:
Error: "Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
I have installed all dll from Runtime Packager.
I have sent all dll, xml and pbds that PB gnerate when project is deployed.
In IIS everything is rightly configured.
So id like to know if someone kwows anything about this error.
thanks in advance
There is a role or feature that needs installed called desktop experience if I remember correctly. This allows a service to have a desktop to run under otherwise it is a console app. I ran into this when printing PDFs from a service. The fonts were wrong and not set to what I set them to until I installed that feature.
It sounds like you already gave iis access to run on the server with full access to windows and file system.
John

Combine JQM, MVC and PhoneGap together

I have a site which uses microsoft mvc 3 on the server side, jQuery Mobile on the client side and I want to combine it with PhoneGap and produce executes for Android and iOS.
Is it possible?
How?
Thanks
Yes, it is possible.
If you must use Phonegap, there are a couple of things to do:
First, you must create a project corresponding to each platform , following these instructions. Once you do that, you basically copy all the client side code (js, html, css) to the www folder of your project. This is one of the reasons, the app could load faster, since it's reading its resources from the local filesystem, and not receiving them from an http connection each time.
Second, you must find a way to provide your server side data to your app. If you are already using REST services or RPC methods to populate your website, then that's done, but if not, you must start by building them, and then calling them from your client (through ajax calls from jQUery most likely), and then rendering them through javascript (you can use the multiple templating libraries out there or just plain javascript, I recommend the latter only if the UI updates are minimal).
As you can see, the second part requires quite a little bit more work. Especially if you haven't built web services before.
The other option ,which does not require phonega/cordova is to use an embedded webview. Then you wouldn't have to do anything. It would work similarly to a browser (Loading the remote URL of your site), with the added advantage of being inside and android/ios app, and you could add other views or communicate with the embedded webview using native code. If you are planning to load html files from the filesystem and not from your server, you would have to do the same thing you have to do with phonegap.
It happened to me, if you have a web app depending on server code I would go with a WebView based app, and not a Cordova app.
It's really simple to create those webviews apps for Android or IPhone.
Here you have an example for building a webview based app on android
Here you have an example for building a webview based app on IOS
Hope it helps.
If you want to reuse your site you'll need a webview that browses it.
Phonegap wouldn't be needed if you use this approach, but the application will not be as responsive as a native app, and the IPhone moderators may reject your app for that reason (it happened to me).
Another approach would be that you recreate your site as a pure Javascript application and only communicate with your servers to execute some REST Services. In this case Apache Cordova makes sense.

How to call Java EE SOAP or REST services from mobile platform. etc Dxtreme, Jquery Mobile, Icenium

I want to develop mobile apps based on HTML, JS. It must work on any device etc iphone, ipad, android and windows phone...
I must use JAVA EE on server side. First I choosed Dxtreme. after I learned dxtreme, it is possible REST Service using ASP.NET Web API. But it is inpossible on Java EE. following error :
But call along #POST, #PUT and #DELETE methods throws error
"XMLHttpRequest cannot load http://www.restserver/Service/item. Origin
http://www.localhost:51140 is not allowed by Access-Control-Allow-Origin".
I believe there must be something that people must be using SOAP or REST Service on Mobile.
Which mobile framework is it possible ?
Please help me.
Thanks.
have You read About Phonegap?U can use phonegap to build application that can work around different Mobile platform.Its uses HTML5,CSS3,Javascript.Hope this helps you......
Generally, people access web services using RESTful interfaces on the server end. You can create that with ASP.NET Web API and many other server side frameworks of course. Your error, I'm guessing, but not sure, is from your client application. If I'm correct, you are probably running some simulator or the app within a browser client, and not one of the mobile framework simulators, and are running into the problem where the browser restricts your access to services on systems other than the site your started with. I.e. if you got to myboringwebpage.com and try to look up something on api.twitter.com within the app, the browser will stop you unless you add certain things to your web server/page telling the browser that that is OK. Look up "CORS". With Icenium, if you use the browser development environment "Mist" you will get those issues. If you use the Windows environment "Graphite" there is no such restriction. If you use the Intel HTML5 XDK at http://html5m.com/, it runs some process to get around those issues, while running a simulator in a browser. If you end up building PhoneGap apps, which you can using Icenium, appery.io, Intel HTML5 XDK, PhoneGap Build and others, the built app, installed on the phone, will not be restricted as an in-browser "app" would. However, I had problems with the Intel framework's XHR code handling all the different methods. Sorry this probably doesn't cover everything you need - you'll have to live and learn a lot of this.

Reading pst (Outlook) files from IIS ASP.NET application

I have to create sort of a .PST file based Web Mail.
I need to read all MailItems, Folders, Contacts and everything i can from PST files given by the user.
I am currently using DCOM interop to create a Application and use Session to add my file's stores.
My problem is that i can't even instantiate the Outlook.Application, the code simply doesn't run.
If i change to Visual Studio Development Web Server everything works as perfectly as expected, but if i change to local IIS Web Server.. nothing happens =/
What i did so far:
Set username and pass to impersonate on web.config
Set username and pass to inpersonate on my WebSite from iis -> Authentication -> ASP.NET impersonation
Added permissions to Everyone, Network Service, IIS_IUSRS, my user account in temp asp files, web site file and pst files i'm trying to read
Unfortunately I've already implemented all I need using TDD, so it would not be a good idea to change the way i'm doing this, like moving to NMapi or something.
Thanks in advance
EDIT:
As i've mentioned before, i I cannot use another library (and that one seems to work, but it's pretty expensive).
I only need this to run on a local server. It is a Web application, but for localhost ONLY.
It is not a good idea to use Outlook on the server side, as is described in detail here: http://support.microsoft.com/kb/257757
Microsoft does not currently recommend, and does not support,
Automation of Microsoft Office applications from any unattended,
non-interactive client application or component (including ASP,
ASP.NET, DCOM, and NT Services), because Office may exhibit unstable
behavior and/or deadlock when Office is run in this environment.
Maybe have a look at http://www.independentsoft.de/pst/

Resources