|
You create an assembly by using a compiler, but I'm at a loss to understand why you are having users create them. How would the be used?
only two letters away from being an asset
|
|
|
|
|
Create an assembly by using a compiler? Could you be a bit more specific ?
It's a windowsapplication that uses COM-Interop to create a excelfile. The XML file has stored the definition for the report, like position of the cell, cell-content, cell-format etc.
Generation the excelreport works fine. But the next step is to create that DLL.
When the user has created that DLL he can upload it to a ASP.Net application which handels that DLL and provides the report as a download.
It has to be a DLL consisting the C#Project(model/generator) and the XML Definiton-File.
|
|
|
|
|
Haris wrote: When the user has created that DLL he can upload it to a ASP.Net application
Woah! You are allowing users to upload DLL files to a web server?! Are you nuts! Can you not see what a massive gaping security hole you are punching in the Web server? It would be like a bank saying that they want to make it easier for their customers to access their money, so here's a stick of dynamite to use if you ever need to access the vault out of hours.
|
|
|
|
|
well ... there would have been a nicer way to say that ... but ... anyway!
it's a application interface definition!
it's my part do generate the DLL ... what happens whit that DLL further -> I don't know exactly and it's not my problem.
|
|
|
|
|
Haris wrote: well ... there would have been a nicer way to say that
My primary concern was to ensure that you understood, in the quickest way possible, the severity of risk in your actions.
Haris wrote: what happens whit that DLL further -> I don't know exactly and it's not my problem.
It is your problem. You already have an idea of how it will be used. You now have an idea that it is an extremely risky solution to the problem.
|
|
|
|
|
when IE is opened, internally I have to save the page on some specified path( as C:\abc.html)
this is code trying
object pvaIn = new object();
object pvaOut = new object();
pvaIn = webBrowser.Document;
pvaOut = @"C:\abc.html";
webBrowser.ExecWB(OLECMDID.OLECMDID_SAVE, OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, ref pvaIn, ref pvaOut);
|
|
|
|
|
And your question is?
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Is there a way to prevent the VS designer to run a specific method? E.g.
[Conditional("DEBUG")]
[DebuggerStepThrough]
public void SomeMethod()
{
}
isn't run in release code. Can I write something similar for the designer?
Why is it drug addicts and computer afficionados are both called users?
--Clifford Stoll
|
|
|
|
|
Hi,
I would add code checking Control.DesignMode
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
So would I!
As an aside, when I write a control I usually derive from something like ScrollableControl or Panel. Just by doing this when I click on the .cs file visual studio opens it up in 'designer' mode. No real point to this comment, but I find it most annoying.
Regards,
Rob Philpott.
|
|
|
|
|
Hi Rob,
you should have asked sooner, I found the solution years ago: just add [System.ComponentModel.DesignerCategory("Code")] right in front of your class line.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Dude, you are a superstar! My life has just improved.
Regards,
Rob Philpott.
|
|
|
|
|
Be happy Microsoft leaves room for improvement...
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Sorry, I didn't mention that I develop WPF. Another way I found is to use DesignerProperties.GetIsInDesignMode(target) .
Why is it drug addicts and computer afficionados are both called users?
--Clifford Stoll
|
|
|
|
|
Luc Pattyn wrote: just add [System.ComponentModel.DesignerCategory("Code")] right in front of your class line
Luc, you are great!
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Nagy Vilmos wrote: you are great!
I know, I've been told before; however I won't change my name to Nagy Pattyn.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Or try:
#if DEBUG
... code for debug only
#endif
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Hi everybody.
Do we have 3DES Encryption in .Net Framework ?
Thanks
|
|
|
|
|
|
|
|
Hi,
i use VS2008 and SQLServer 2005.
How can i debug a sql-statement, that includes parameters like this ?
string sqlstatement = "INSERT INTO artikel (nr,text1,text2)" +
"VALUES" +
"( @parm1, " +
" @parm2, " +
" @parm3 " +
" " +
" )";
SqlCommand sqlins = new SqlCommand(sqlstatement, con);
sqlins.Parameters.Add("@parm1", SqlDbType.NVarChar).Value = var1;
sqlins.Parameters.Add("@parm2", SqlDbType.Int).Value = var2;
sqlins.Parameters.Add("@parm3", SqlDbType.Int).Value = var3;
sqlins.ExecuteNonQuery();
so, how can i see the statement, that will be sent to the sql-server ?
bye jogi
|
|
|
|
|
The parameters don't get substitued and then sent to SQL Server. Your statement gets sent and the parameters supplied seperately, SQL server then does the 'substitution'. It allows it to work more efficiently that way.
So, not sure you can.
Regards,
Rob Philpott.
|
|
|
|
|
Run a trace in SQL Profiler
|
|
|
|
|
sorry, i never did hat.
can you give a example ?
|
|
|
|