|
Hi
i have seen a desktop application which run via http request on the browser. for example user write a url (problabely location of the application in server) in his/her browser and then press enter, the application run in client machine from network (but app is not installed in client machine, only .net framework has been installed in client machine)
how to do this ?
Thanks
|
|
|
|
|
Have a look at ClickOnce.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
hdv212 wrote: (but app is not installed in client machine, only .net framework has been installed in client machine)
If it runs outside of the browser, then it might have been wrapped as a Remote Application[^]. I believe that VMWare does something similar.
If it runs within the browser, then it's probably an ActiveX control. Those get installed in the browser itself, depending on your security settings.
So, two possible options, but no ready-to-go solutions. If it were easy to do, then everybody would simply run their WinForms-app over the internet
I are troll
|
|
|
|
|
Hi Pete
i don't install or update app via internet, why ClickOnce ?
Hi Eddy
can u give me more explain about this options and solutions ?
|
|
|
|
|
hdv212 wrote: Hi Pete
i don't install or update app via internet, why ClickOnce ?
If you are replying to Pete, then make sure that you reply to his post. We get an email when somebody replies to a post. Pete didn't get your reply by mail this way.
hdv212 wrote: can u give me more explain about this options and solutions ?
For RemoteApp;
This way, the app sits on a server. The client makes a connection, gets to view the app locally, and is running it on the server.
There's a step-by-step guide here[^].
For ActiveX hosting
This way, the app is embedded in the webpage. The client connects, downloads the ActiveX and runs it locally.
The Microsoft Knowledge Base[^]
This is not an easy task and will take quite some effort.
I are troll
|
|
|
|
|
|
Hi. If i try to run my applications on a mapped drive i get a security warning in the top left corner of the applications window. And apllication doesn't work as it gives me an information window : "Application attempted to perform an operation not allowed by the security policy.
...
Request for the permission of type 'System.Security.Permissions.FileIOPPermission, mscorlib, version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
How can i make my applications work in such an envirioment? I've seen normal delphi apps work
Thanks in advance!
Regards,
Matjaž
|
|
|
|
|
It is because of the code access security. Read about Caspol.exe[^]. This[^] blog post can also help.
|
|
|
|
|
Thanks for your answer!
So that means there's no way to get applications running by adding some extra code?
Only localy with administrator account and change some settings?
Regards,
Matjaž
|
|
|
|
|
Matjaž Grahek wrote: So that means there's no way to get applications running by adding some extra code?
I am not sure, but I think there is no other way.
|
|
|
|
|
It wouldn't be providing much security if you could simply bypass it..
I are troll
|
|
|
|
|
|
I have an object, called Tag, which inherits List<Tag>. This works great code wise, I can add objects of type tag to my tag without issue. But when I try to serialize the object to XML it crashes with a "An unhandled exception of type 'System.StackOverflowException' occurred in System.Xml.dll" error when I try to initialize a new instances the XmlSerializer class, and pass in the type of Tag.
If I remove the Inherts List<Tag> and just create a new property of type List<Tag> instead, then this serializes great, but does not give me quite the appearance I want. Is there someway to make this work without custom serialization, or maybe only minor custom serialization?
Thanks,
Peter
|
|
|
|
|
Im having the same issue. Have you found the solution?
|
|
|
|
|
Nope, never did find a work around, ended up doing it a different way, can't remember exactly how right now.
|
|
|
|
|
Hello!
I´ve created an windows service with a timer-object. My application runs a method with a given interval, which builds up strings in memory and when finished with one string sends data to our database. Problem is, my application seems to be running on several threads, which messes up the string-values I hold in memory.
I run this code in the start of the method I´ve set my timerobject to perform:
Log.Write("current threadid : " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString());
which gives me
current threadid : 4<br />
current threadid : 7<br />
current threadid : 8<br />
current threadid : 4<br />
current threadid : 7<br />
current threadid : 8<br />
current threadid : 4<br />
current threadid : 8<br />
current threadid : 7<br />
current threadid : 8
etc.
Is this how windows services work, and can I manage this behaviour somehow?
|
|
|
|
|
livez wrote: Problem is, my application seems to be running on several threads, which messes up the string-values I hold in memory.
Problem will be with timer. You should not use a timer here. Try to run your method in a thread. You can also read Luc's article Timer surprises, and how to avoid them[^].
|
|
|
|
|
I presume you are using System.Threading.Timer ?
When this fires, it uses a thread from the thread pool to run your TimerCallback method. You can verify this using:
System.Threading.Thread.CurrentThread.IsThreadPoolThread
If your method takes longer to execute than the timer period, then when the timer fires again, it will run your method again ( concurrently ) on a different thread pool thread.
You have to take this into account when writing your TimerCallback method.
Nick
----------------------------------
Be excellent to each other
|
|
|
|
|
Thanks alot guys, u were spot on!
|
|
|
|
|
Hi friends,
I have a file called 'simple.txt' in the C:// drive, but I dont know the exact location in the drive, since there are many directories present. Now, I want to manipulate with the file, i.e., write, read, rename or delete it from the drive. Suppose, I want to delete it with this code: System.IO.File.Delete(@"C:/simple.txt"); or run/open the file with this peice of code: System.Diagnostics.Process.Start(@"C:/simple.txt"); . But this works, only if the file's location is C://simple.txt, not in the case of C://unknowndirectory/simple.txt. Please help me. And also tell me, if its possible to manipulate with a file without assigning its extension.
Your help will be greatly appreciated,
Rajdeep.NET
NOTE: I've posted the same question earlier also, but since I did not find any appropriate result, I had to post it again with better explanation.
|
|
|
|
|
Rajdeep.NET wrote: Suppose, I want to delete it with this code: System.IO.File.Delete(@"C:/simple.txt");
Won't work, you'll get a FileNotFoundException since the path is incorrect.
Create a method that reads all the filenames in a folder. Next, loop all those filenames to check whether "simple.txt" is among them. If the file is a folder, then call your function recursively to check those too.
It's a slow way of finding a file, but it works
Rajdeep.NET wrote: And also tell me, if its possible to manipulate with a file without assigning its extension.
Can't be done, you'll need the extension. Otherwise you might accidentally delete "simple.jpg" or "simple.mp3" while you wanted to kill "simple.txt".
Good luck
I are troll
|
|
|
|
|
A huge thaks to you Eddy!!!
But, since I am not that expert..... can you provide me a related link which defines this process????
Once again,
Thank you veru much,
Rajdeep.NET
|
|
|
|
|
Rajdeep.NET wrote: But, since I am not that expert
I'm no expert either :p
Here's a small example of recursion;
void SearchRecursive(string Path)
{
foreach(string myFile in Path)
{
if (myFileName == Folder)
{
SearchRecursive(Path + myFileName)
}
}
}
I are troll
|
|
|
|
|
Eddy Vluggen wrote: foreach(string myFile in Path)
But the problem is that, in this piece of code, I have to mention the file path name, although I am unknown about its location in the drive. Please provide me a better link.
|
|
|
|
|