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

is System.Windows.Forms DLL safe for server-side use?

P: n/a
I need to use the ResXResourceReader/Writer in my ASP.NET application, but
these classes are included in the Winforms assembly.
I am certain I CAN reference this assembly and use the classes, but is this
safe? In the sense of "does this assembly do anything that's not
server-friendly" ?

any thoughts/pointers/existing experience out there?
TIA
Jun 4 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
That all depends on which objects/methods you're using.
The resource functions you mentioned should be ok.
Then again, doing things like calling MessageBox.Show are not likely to
work...

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"OlegD" <Ol***@discussions.microsoft.comwrote in message
news:05**********************************@microsof t.com...
>I need to use the ResXResourceReader/Writer in my ASP.NET application, but
these classes are included in the Winforms assembly.
I am certain I CAN reference this assembly and use the classes, but is
this
safe? In the sense of "does this assembly do anything that's not
server-friendly" ?

any thoughts/pointers/existing experience out there?
TIA
Jun 4 '07 #2

P: n/a
Right, I understand that using a MessageBox would be like shooting myself in
the foot ;-)
I am primarily interested in finding out if just using this assembly might
cause any undesired behavior in server apps (example of a scenario that I am
worried about: developers of this assembly used the MessageBox to show some
info because they assumed the assembly would always be used in a GUI app)...

"Steve C. Orr [MCSD, MVP, CSM, ASP Inside" wrote:
That all depends on which objects/methods you're using.
The resource functions you mentioned should be ok.
Then again, doing things like calling MessageBox.Show are not likely to
work...

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net
"OlegD" <Ol***@discussions.microsoft.comwrote in message
news:05**********************************@microsof t.com...
I need to use the ResXResourceReader/Writer in my ASP.NET application, but
these classes are included in the Winforms assembly.
I am certain I CAN reference this assembly and use the classes, but is
this
safe? In the sense of "does this assembly do anything that's not
server-friendly" ?

any thoughts/pointers/existing experience out there?
TIA
Jun 5 '07 #3

P: n/a
On Jun 5, 1:44 pm, OlegD <O...@discussions.microsoft.comwrote:
Right, I understand that using a MessageBox would be like shooting myself in
the foot ;-)
I am primarily interested in finding out if just using this assembly might
cause any undesired behavior in server apps (example of a scenario that I am
worried about: developers of this assembly used the MessageBox to show some
info because they assumed the assembly would always be used in a GUI app)...
You can always use Lutz Roeder's .NET Reflector to explore a class and
see exactly what the code is doing. ResXResourceReader is thankfully
small enough to let you look through all of the code in less than an
hour.

Damien

Jun 5 '07 #4

P: n/a
Thank you for the tip, but my question is not about the ResXResourceReader
class itself, it is about the WinForms assembly. Are there any side-effects
to having this assembly loaded? Any static constructors that assume a GUI
environment, etc, etc...

"Damien" wrote:
On Jun 5, 1:44 pm, OlegD <O...@discussions.microsoft.comwrote:
Right, I understand that using a MessageBox would be like shooting myself in
the foot ;-)
I am primarily interested in finding out if just using this assembly might
cause any undesired behavior in server apps (example of a scenario that I am
worried about: developers of this assembly used the MessageBox to show some
info because they assumed the assembly would always be used in a GUI app)...
You can always use Lutz Roeder's .NET Reflector to explore a class and
see exactly what the code is doing. ResXResourceReader is thankfully
small enough to let you look through all of the code in less than an
hour.

Damien

Jun 5 '07 #5

P: n/a
On Jun 5, 3:18 pm, OlegD <O...@discussions.microsoft.comwrote:
Thank you for the tip, but my question is not about the ResXResourceReader
class itself, it is about the WinForms assembly. Are there any side-effects
to having this assembly loaded? Any static constructors that assume a GUI
environment, etc, etc...
Static constructors are only called on classes which your code uses,
not on every class within an assembly. Therefore, provided you are
only accessing ResXResourceReader, you're safe. If you're using other
classes, you can examine them for safety too.

Damien

Jun 6 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.