I want to run my WPF application on asp.net web application. Actually I have a WPF page.xaml which contain the image viewer, which actually open image and edit it as required.
Now I want to embed that in my Asp.net Web application. I have a asp.net web application user control on which I want that WPF stuff. I research on it on the internet, I find a way that we first publish the WPF application on the IIS server and then past the URL in asp.net web application page iframe. as I follow this below link:
http://msdn.microsoft.com/en-us/library/aa970060.aspx#deploying_a_xbap
now I not want to follow this approach. I want an alternate way of this. Is there any way to handle this scenario. If yes then how can we achieve this?
Yes there's a better way: you can use Silverlight (basically it's a C# equivalent to Flash).
Even if Silverlight is quite the same as WPF, there is some differences due to the fact that silverlight is made for web. So you'll have to make some changes to your application.
About integrating it in your page, it seems quite simple:
You can use an object html element (as you would do with Flash)
Here are some links about that:
http://msdn.microsoft.com/fr-fr/library/cc838145(v=vs.95).aspx
http://www.c-sharpcorner.com/uploadfile/raj1979/host-silverlight-in-Asp-Net/
2 years later, a possible answer appears! Maybe someone else will see this and get some use out of it.
I have been hearing rumors that it is possible to run your WPF application in a browser, it's called an XBAP?
https://msdn.microsoft.com/en-us/library/aa970060%28v=vs.110%29.aspx
I am about to give this a try myself, I'll update this answer with any limitations I find.
Related
kindly tell if there is any way to solve the connectivity of the vcsharp with asp.net. as i am trying to run the c# windows form application on asp.net to make my website more knowlodge able. Is there any other connevtivity option besides aspnet.
You can run web application in windows Forms application. You may embed the WebBrowser control. It makes sense, but if you want to run desktop application in a asp.net web this doesn't make sense IMO.
If you want to benefit from Rich Controls behaviors, you have web widget available within jQuery UI, BootStrap, etc.
Don't mix things
EDITS: According to your first comment, I'd suggest you to search for the web sdk for arcgis or an equivalent. Or You may need to reference dll available in the SDK and use web controls to display data
Plz read this
I want to know if I will be able to control a web browser using a C# program. What I want to do is the following:
I want to create a windows desktop application which will allow me to Open a web-browser (google chrome), input a webpage address, go to a web page, type something in a specific field or click something.
All of the above would have to be done automatically by the C# application without any user intervention after he opens up the application.
I want to know is it possible doing it in C# ? and if it isn't I would like some suggestions guiding me how would I go about creating this app, what programming language should I take a a look at or what should I research.
I only want a guidance for how I should go about creating this application.
Thanks to anyone who is going to answer ;)
There are a few possibilities to achieve this:
Use WatIn http://www.codeproject.com/Articles/17064/WatiN-Web-Application-Testing-In-NET
Or Selenium http://docs.seleniumhq.org/
Use WebClient, HttpRequest, HttpResponse classes
Using Visual Studio 2012 I tried to follow the steps given in the link
http://msdn.microsoft.com/en-us/magazine/cc135987.aspx
for the same I downloaded Silverlight.js file from
http://archive.msdn.microsoft.com/silverlightjs
but in the very first example of growing and shrinking green sphere I was unable to see expected output. I see a blank white page. Is something I am missing. I tested my silverlight installation, its perfectly running sample silverlight application in browser, so no issue in silverlight version etc. Because the article posted on the link is too old. So there may be some updates or change in way of using. Please let me know where am I going wrong.
You are right - that is a very old article, and the method of embedding the Silverlight control in the ASPX page changed at about v3 of Silverlight.
I suggest you watch this instruction video: Adding Silverlight to a Web Page. Additionally this page is also a good launch page for learning more about Silverlight.
I was wondering if ASPX page can use WPF Controls (from the toolbox in the designer)?
Because I have a custom user control that I made for a application before but now i am creating a web app. In the web app the controls were grayed out.
I was wondering if there is a way to use the user control in the web app?
Unfortunately, you'll have to create a new ASP.Net control that mimics your WPF control. The two technologies have completely different approaches to rendering (DirectX primitives vs. HTML), events (Routed events vs. Postbacks), etc. and are simply not compatible.
That being said, converting a WPF control to a Silverlight control is doable, and would allow you to leverage your previous work. You would still need to run it through a Silverlight app, though, rather than directly through the ASPX page.
ASP.NET is primarily a server side framework and WPF applications run on the client, therefore they don't really work well together. You might find it easier to convert the WPF control into a Silverlight control instead and pass that through your ASP.NET page. Users will need a Silverlight plugin to run it.
These two posts might help in the conversion:
Porting from WPF to Silverlight: The Missing Pieces, Part 1
Porting from WPF to Silverlight: The Missing Pieces, Part 2
I'm looking for solution how to integrate WPF desktop application with reCaptcha! Anyone knows the solution?
I'm working on registration module to my application, and need good and simple captcha.
Thanks!
See https://developers.google.com/recaptcha/docs/display and https://developers.google.com/recaptcha/docs/verify.
You could make an request to http://www.google.com/recaptcha/api/challenge?k=your_public_key and parse the ChallengeValue. This value can be used to get the recaptcha image via http://www.google.com/recaptcha/api/image?c=challenge_value. Afaik URL Images can be displayed in WPF directly.
Let the user input into a TextBox (or similar) control.
For verification, use this input and make a request to http://www.google.com/recaptcha/api/verify (see documentation above).
Have you tried this - http://code.google.com/apis/recaptcha/docs/aspnet.html. It says it works in any .Net language, including C#. There is also this page although it is 2 years old.