Click here to Skip to main content
15,885,941 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello guys,

I made a simple puzzle as a Windows application. The puzzle.exe file works fine on Windows but I want to publish the game to be online. How can I run puzzle.exe file in the browser? There will be an option to download the EXE file, but I want people to play the puzzle online too.

Thanks in advance.
Posted
Updated 12-Dec-19 8:17am
v2

You can't - not as is. You cannot run an EXE file on a client's machine - they have to download it first (and must have the appropriate .NET framework installed). Any attempt to run an exe on a client machine is tagged as "probable virus activity" and is prevented for security reasons.
You will have to re-write your game to work as web app - i.e. working within the browser. This may not be easy depending on your game...
 
Share this answer
 
Comments
SREENATH GANGA 25-Jun-11 10:34am    
can it be run on web like applet in java? sir sorry if iam asking foolishness
SubsonicDesignOfficial 25-Jun-11 11:32am    
In the current form, no. Java applets can be run on browser if the user has installed Java Virtual Machine. There's no such thing in .Net. As OriginalGriff said, you have to rewrite parts of the program to work on browsers. You might want to take a look at Silverlight or ASP.Net (silverlight is a better choice because you are talking about game development)
Dave Kreskowiak 25-Jun-11 12:00pm    
There's no such thing in .Net.
Yes, there is. It's called Silverlight.
SubsonicDesignOfficial 25-Jun-11 12:05pm    
Thanks for correcting!
OriginalGriff 25-Jun-11 12:00pm    
Cheers! That's pretty much what I was going to say. :thumbsup:
Rewrite your app in Silverlight[^] and you've got the option to do what you've decribed.
 
Share this answer
 
v2
If you turn your windows forms form into a user control, you can use the approach outlined in this article to enable IE to host your application:
http://steveorr.net/articles/WinformControls.aspx[^]

So it can be done, but doing it like this involves a lot of trust - so it would usually be considered inapropriate.

Best regards
Espen Harlinn
 
Share this answer
 
Comments
Vivek Krishnamurthy 25-Jun-11 14:26pm    
My 5!
Espen Harlinn 25-Jun-11 14:52pm    
Thank you, Vivek!
Sergey Alexandrovich Kryukov 25-Jun-11 18:40pm    
Agree, a 5.
--SA
Espen Harlinn 26-Jun-11 4:32am    
Thank you, SAKryukov!
a forms app like you describe is not deployed via the web directly.

you are discussing 2 topics - deployment of a winform app (usually via MSI or raw exe, which could be downloaded and run locally) VS. architecture (web app, which runs inside the browser and is hosted on a web server).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900