By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,157 Members | 891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,157 IT Pros & Developers. It's quick & easy.

Possible To Run Sample.cs In My Application ?

P: n/a
Hello,

Can my application call a web service ? and web service returns a class file
? Then

May I run this "cs" file in my main application ? without compiling ?

Thanks

Coder @Toronto
Nov 18 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Coder wrote:
Hello,

Can my application call a web service ? and web service returns a class
file ? Then

May I run this "cs" file in my main application ? without compiling ?

Thanks

Coder @Toronto
No.

Your application can call a web service, and the web service can return
anything that can be serialised as a string (i.e. you can not return a
file, but you can return the contents of a file). You can not run source
code without compiling it.

--
Göran Andersson
_____
http://www.guffa.com
Nov 18 '08 #2

P: n/a
Coder,

Without compiling? No, you can't do that. However, you can use the
CSharpCodeProvider class in the Microsoft.CSharp namespace to compile the
code.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Coder" <So*****@Somewhere.Co.Ukwrote in message
news:OH****************@TK2MSFTNGP04.phx.gbl...
Hello,

Can my application call a web service ? and web service returns a class
file ? Then

May I run this "cs" file in my main application ? without compiling ?

Thanks

Coder @Toronto
Nov 18 '08 #3

P: n/a
on 18-11-2008, Coder supposed :
Hello,

Can my application call a web service ? and web service returns a class file
? Then

May I run this "cs" file in my main application ? without compiling ?

Thanks

Coder @Toronto
As Göran said, it's not possible to run without compiling, but it *is*
possible to compile a source "on the fly" from within your running
application. However, this would be a big security hole if you get
source code from some webservice!

Hans Kesting
Nov 18 '08 #4

P: n/a
Thanks for all,

My purpose is to install (using clickonce) main application to client as MDI
Form, this form will contain a treeview (holding some nodes) and every node
click will go same web service service(username, userpass, DesiredClassLib)
and will get a class library (as file or stream or byte[] or string,
whatever..) and this separate class libraries will have a generic method
ShowAsMDIChild() and will be shown in main application

Everytime a user wants to invoke a node, this cycle will run, and I do not
wanna keep class libraries' dlls on client physically.

and in the spotlight, security is not the issue this time :)

If (Thisispossible())
{
WhatMustBeTheCorrectWay();

Thanks();
}
else
{
Thanks();
}

"Coder" <So*****@Somewhere.Co.Ukwrote in message
news:OH****************@TK2MSFTNGP04.phx.gbl...
Hello,

Can my application call a web service ? and web service returns a class
file ? Then

May I run this "cs" file in my main application ? without compiling ?

Thanks

Coder @Toronto


Nov 18 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.