Saturday, March 31, 2012
SendUsing configuration value is invalid
Our applications will be created with ASP.NET running on Windows 2003
servers using Framework 1.1
To minimize the administrative effort of configuring developer workstations
and servers, we want developers not to specify a value for
System.Web.Mail.SmtpMail.SmtpServer.
We also have a requirement that on the servers the Application Pools in IIS
run under domain accounts maintained by our Windows Server Administration
group. These accounts are not allowed to be Administrators on the servers.
This domain user has been added to the IIS_WPG group and IIS_WPG has been
added as an operator of the Default SMTP Virtual Server.
Scenarios of sending out emails
1)
- Our user is a non-Administrator
- System.Web.Mail.SmtpMail.SmtpServer = ""
- Result: Error: The "SendUsing" configuration value is invalid.
2)
- Our user is a non-Administrator
- System.Web.Mail.SmtpMail.SmtpServer = "localhost"
- Result: Email is successfully sent.
3)
- We make our user an Administrator (which is not allowed as a solution)
- System.Web.Mail.SmtpMail.SmtpServer = ""
- Result: Email is successfully sent.
We want scenario 1 to work. By the results of scenario 3 it looks like a
permission issue for our non-Admin user. I scoured REGMON and FILEMON findin
g
no hints.
So outside of being an operator for SMTP, what permissions is our user
missing?
Thanks,
fmHi Fm,
From your description, you're using the System.Web.Mail to send mail and
the smtpserver is the local IIS smtp server(on W2K3 IIS6). However you
found that if you specify the SmtpMail.SmtpServer as "localhost", it work
well. If is assigned "", it only works when the asp.net's process identity
is a domain accoutn which has administrator privilege, yes?
Based on this, I've also performed some tests and did find the same
behaviors. I test the same code in Console application,asp.net(with LOCAL
SYSTEM process account) asp.net (default workerprocess account ),
asp.net(with admin domain worker process account). All of them excepet
using the default workprocess work well. So from a general view, this is
likely a permission issue and I'm also not sure the definite permission we
need. Currently I'm consulting some further experts on this behavior and
I'll update you as soon as I've got any update.
Thanks for your understanding.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Steven,
You've produced exactly the problem we are having. I await your findings.
Thanks,
Fm
"Steven Cheng[MSFT]" wrote:
> Hi Fm,
> From your description, you're using the System.Web.Mail to send mail and
> the smtpserver is the local IIS smtp server(on W2K3 IIS6). However you
> found that if you specify the SmtpMail.SmtpServer as "localhost", it work
> well. If is assigned "", it only works when the asp.net's process identit
y
> is a domain accoutn which has administrator privilege, yes?
> Based on this, I've also performed some tests and did find the same
> behaviors. I test the same code in Console application,asp.net(with LOCAL
> SYSTEM process account) asp.net (default workerprocess account ),
> asp.net(with admin domain worker process account). All of them excepet
> using the default workprocess work well. So from a general view, this is
> likely a permission issue and I'm also not sure the definite permission we
> need. Currently I'm consulting some further experts on this behavior and
> I'll update you as soon as I've got any update.
> Thanks for your understanding.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
Hi Fm,
Sorry for keeping you waiting. After some further consultant, I think the
following information maybe helpful:
http://msdn.microsoft.com/library/d...-us/e2k3/e2k3/_
techsel_tech_1.asp
=========================
Run-Time Permissions
No special permissions are required to run interactive applications or ASP
pages to enable use of CDOSYS. In applications that use the SMTP or NNTP
drop-directory, the application or user must have permission to write into
that directory. When running an application that sends e-mail, the user
will require either write access to the pick-up directory, or read access
to the IIS metabase so the application can determine the SMTP port used for
sending mail.
==========================
So I think when we dont specify an smtpserver (or leave a required field
null), cdo tries to get configuration settings from outlook express or
from metabase. Administrator has access to metabase and thus operation
succeeds. Other users dont so they get sendusing configuration is invalid.
#816789 Read Access to the Everyone Group Is Removed After You Install
Exchange
http://support.microsoft.com/?id=816789
In addition, it is recommended that we always specify the definite
smtpserver names for when calling the System.Web.Mail components or CDO.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Sorry it took so long for me to get back to you. We will make it part of our
architecture to have a SMTP server set on the object.
"Steven Cheng[MSFT]" wrote:
> Hi Fm,
> Sorry for keeping you waiting. After some further consultant, I think the
> following information maybe helpful:
> > Exchange
> [url]http://support.microsoft.com/?id=816789" target="_blank">http://msdn.microsoft.com/library/d...com/?id=816789
> In addition, it is recommended that we always specify the definite
> smtpserver names for when calling the System.Web.Mail components or CDO.
> Thanks.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
Hi Fm,
Thanks for your followup.
Good luck!
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
SendUsing configuration value is invalid
Our applications will be created with ASP.NET running on Windows 2003
servers using Framework 1.1
To minimize the administrative effort of configuring developer workstations
and servers, we want developers not to specify a value for
System.Web.Mail.SmtpMail.SmtpServer.
We also have a requirement that on the servers the Application Pools in IIS
run under domain accounts maintained by our Windows Server Administration
group. These accounts are not allowed to be Administrators on the servers.
This domain user has been added to the IIS_WPG group and IIS_WPG has been
added as an operator of the Default SMTP Virtual Server.
Scenarios of sending out emails
1)
- Our user is a non-Administrator
- System.Web.Mail.SmtpMail.SmtpServer = ""
- Result: Error: The "SendUsing" configuration value is invalid.
2)
- Our user is a non-Administrator
- System.Web.Mail.SmtpMail.SmtpServer = "localhost"
- Result: Email is successfully sent.
3)
- We make our user an Administrator (which is not allowed as a solution)
- System.Web.Mail.SmtpMail.SmtpServer = ""
- Result: Email is successfully sent.
We want scenario 1 to work. By the results of scenario 3 it looks like a
permission issue for our non-Admin user. I scoured REGMON and FILEMON finding
no hints.
So outside of being an operator for SMTP, what permissions is our user
missing?
Thanks,
fmHi Fm,
From your description, you're using the System.Web.Mail to send mail and
the smtpserver is the local IIS smtp server(on W2K3 IIS6). However you
found that if you specify the SmtpMail.SmtpServer as "localhost", it work
well. If is assigned "", it only works when the asp.net's process identity
is a domain accoutn which has administrator privilege, yes?
Based on this, I've also performed some tests and did find the same
behaviors. I test the same code in Console application,asp.net(with LOCAL
SYSTEM process account) asp.net (default workerprocess account ),
asp.net(with admin domain worker process account). All of them excepet
using the default workprocess work well. So from a general view, this is
likely a permission issue and I'm also not sure the definite permission we
need. Currently I'm consulting some further experts on this behavior and
I'll update you as soon as I've got any update.
Thanks for your understanding.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Steven,
You've produced exactly the problem we are having. I await your findings.
Thanks,
Fm
"Steven Cheng[MSFT]" wrote:
> Hi Fm,
> From your description, you're using the System.Web.Mail to send mail and
> the smtpserver is the local IIS smtp server(on W2K3 IIS6). However you
> found that if you specify the SmtpMail.SmtpServer as "localhost", it work
> well. If is assigned "", it only works when the asp.net's process identity
> is a domain accoutn which has administrator privilege, yes?
> Based on this, I've also performed some tests and did find the same
> behaviors. I test the same code in Console application,asp.net(with LOCAL
> SYSTEM process account) asp.net (default workerprocess account ),
> asp.net(with admin domain worker process account). All of them excepet
> using the default workprocess work well. So from a general view, this is
> likely a permission issue and I'm also not sure the definite permission we
> need. Currently I'm consulting some further experts on this behavior and
> I'll update you as soon as I've got any update.
> Thanks for your understanding.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
Hi Fm,
Sorry for keeping you waiting. After some further consultant, I think the
following information maybe helpful:
http://msdn.microsoft.com/library/d...-us/e2k3/e2k3/_
techsel_tech_1.asp
=========================
Run-Time Permissions
No special permissions are required to run interactive applications or ASP
pages to enable use of CDOSYS. In applications that use the SMTP or NNTP
drop-directory, the application or user must have permission to write into
that directory. When running an application that sends e-mail, the user
will require either write access to the pick-up directory, or read access
to the IIS metabase so the application can determine the SMTP port used for
sending mail.
==========================
So I think when we dont specify an smtpserver (or leave a required field
null), cdo tries to get configuration settings from outlook express or
from metabase. Administrator has access to metabase and thus operation
succeeds. Other users dont so they get sendusing configuration is invalid.
#816789 Read Access to the Everyone Group Is Removed After You Install
Exchange
http://support.microsoft.com/?id=816789
In addition, it is recommended that we always specify the definite
smtpserver names for when calling the System.Web.Mail components or CDO.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Sorry it took so long for me to get back to you. We will make it part of our
architecture to have a SMTP server set on the object.
"Steven Cheng[MSFT]" wrote:
> Hi Fm,
> Sorry for keeping you waiting. After some further consultant, I think the
> following information maybe helpful:
> http://msdn.microsoft.com/library/d...-us/e2k3/e2k3/_
> techsel_tech_1.asp
> =========================
> Run-Time Permissions
> No special permissions are required to run interactive applications or ASP
> pages to enable use of CDOSYS. In applications that use the SMTP or NNTP
> drop-directory, the application or user must have permission to write into
> that directory. When running an application that sends e-mail, the user
> will require either write access to the pick-up directory, or read access
> to the IIS metabase so the application can determine the SMTP port used for
> sending mail.
> ==========================
> So I think when we don?ˉt specify an smtpserver (or leave a required field
> null), cdo tries to get configuration settings from outlook express or
> from metabase. Administrator has access to metabase and thus operation
> succeeds. Other users don?ˉt so they get sendusing configuration is invalid.
> #816789 Read Access to the Everyone Group Is Removed After You Install
> Exchange
> http://support.microsoft.com/?id=816789
> In addition, it is recommended that we always specify the definite
> smtpserver names for when calling the System.Web.Mail components or CDO.
> Thanks.
> Regards,
> Steven Cheng
> Microsoft Online Support
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
Hi Fm,
Thanks for your followup.
Good luck!
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Thursday, March 29, 2012
Separate webfolder for each developer in single web project
http://groups.google.ru/group/micro...-JaaxaeIKyXy0Eg
I need to organize the same structure in my solution. This means to
have 1 Web Application Project or Web Site Project. But when developers
get solution from VSS and start them they should have their own
WebFolder to be opened. That means dev1 should have web project in
remotehost\dev1webfolder, dev in remotehost\dev2webfolder.
And i don't want developers to change project file in vss on their own
computers to reach this.
Please. helpIf you are remoting, set up a source repository (SourceSafe, CVS,
Subversion, Team System). Each developer checks out to a different spot on
the machine. Everyone remotes in and has code in a different directory.
NOTE: Only one person can debug at a time if you are on one machine, ulnless
you set up independent app pools (or use file based webs if using Visual
Studio 2005).
To set up independent app pools, you go into IIS and create the app pools.
After having each developer pull code to a specific location, you set up the
applications as web applications and set their pool.
Open IIS Manager
Create pools
Have developers get code to a directory
Set each developers directory in IIS by creating new virtual directories
Right click each application directory in IIS Mgr and go to properties
Under home directory, set the application pool for this application
Once again, you CAN go to file based webs, which require no setup.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
*************************************************
Think outside of the box!
*************************************************
<alexey.yakovlev@.gmail.comwrote in message
news:1158064382.308774.159710@.i42g2000cwa.googlegr oups.com...
Quote:
Originally Posted by
Hi, please read this before
http://groups.google.ru/group/micro...-JaaxaeIKyXy0Eg
>
I need to organize the same structure in my solution. This means to
have 1 Web Application Project or Web Site Project. But when developers
get solution from VSS and start them they should have their own
WebFolder to be opened. That means dev1 should have web project in
remotehost\dev1webfolder, dev in remotehost\dev2webfolder.
And i don't want developers to change project file in vss on their own
computers to reach this.
>
Please. help
>
Saturday, March 24, 2012
Serializing between two projects
Say I have a solution with two projects (Project1 and Project2) and each
project contains a class (Project1 contains Class1 and Project2 contains
Class2).
The projects don't reference each other. Here's my question: can I
serialize Class1 and use the serialized XML in Class2? How would Class2
de-serialize the XML to retrieve the Class1's properties? I don't see how I
can do this since Project2 doesn't even know about Class1.
The example in MSDN (the Purchase Order Example) shows how to do this but
with classes in the same project. I want to do it with classes in different
projects.
TIA,
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA AutomationSo long as both classes have the same name and the same public
interface, sure. It should deserialize just fine.
What happened when you tried?
Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
--
Get your own Travel Blog, with itinerary maps and photos!
http://www.blogabond.com/
Jason,
Thanks for writing.
Class1 and Class2 are not the same class. Class2 uses Class1's properties.
For example, Class2 could have a method call where is needs some information
stored in Class1, i.e.
Sub Method2(TextValue as String, SomeClass1Value as Class1.Property1)
'Do something using the Class1's Property1...
End Sub
I need to pass the information contained in Class1 in Project1 to a method
in Class2 in Project2. I can't allow Project2 to reference Project1.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Jason Kester" wrote:
> So long as both classes have the same name and the same public
> interface, sure. It should deserialize just fine.
> What happened when you tried?
> Jason Kester
> Expat Software Consulting Services
> http://www.expatsoftware.com/
> --
> Get your own Travel Blog, with itinerary maps and photos!
> http://www.blogabond.com/
>
write your own serializer.
-- bruce (sqlwork.com)
"Joe" <joeherro@.donotspam.yahoo.com> wrote in message
news:DC2EFF4E-2F7E-4689-9223-D0A7B2AF3143@.microsoft.com...
> Hello All:
> Say I have a solution with two projects (Project1 and Project2) and each
> project contains a class (Project1 contains Class1 and Project2 contains
> Class2).
> The projects don't reference each other. Here's my question: can I
> serialize Class1 and use the serialized XML in Class2? How would Class2
> de-serialize the XML to retrieve the Class1's properties? I don't see how
> I
> can do this since Project2 doesn't even know about Class1.
> The example in MSDN (the Purchase Order Example) shows how to do this but
> with classes in the same project. I want to do it with classes in
> different
> projects.
> TIA,
> --
> Joe
> VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
How. I've never done this.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Bruce Barker" wrote:
> write your own serializer.
> -- bruce (sqlwork.com)
>
> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
> news:DC2EFF4E-2F7E-4689-9223-D0A7B2AF3143@.microsoft.com...
> > Hello All:
> > Say I have a solution with two projects (Project1 and Project2) and each
> > project contains a class (Project1 contains Class1 and Project2 contains
> > Class2).
> > The projects don't reference each other. Here's my question: can I
> > serialize Class1 and use the serialized XML in Class2? How would Class2
> > de-serialize the XML to retrieve the Class1's properties? I don't see how
> > I
> > can do this since Project2 doesn't even know about Class1.
> > The example in MSDN (the Purchase Order Example) shows how to do this but
> > with classes in the same project. I want to do it with classes in
> > different
> > projects.
> > TIA,
> > --
> > Joe
> > VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
>
Take a look at the sample I posted in reply to the other thread you started.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Complex things are made up of
Lots of simple things.
"Joe" <joeherro@.donotspam.yahoo.com> wrote in message
news:C2005721-C6D0-4A96-AD10-25E8F75D7DF0@.microsoft.com...
> How. I've never done this.
> --
> Joe
> VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
>
> "Bruce Barker" wrote:
>> write your own serializer.
>>
>> -- bruce (sqlwork.com)
>>
>>
>> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
>> news:DC2EFF4E-2F7E-4689-9223-D0A7B2AF3143@.microsoft.com...
>> > Hello All:
>>> > Say I have a solution with two projects (Project1 and Project2) and
>> > each
>> > project contains a class (Project1 contains Class1 and Project2
>> > contains
>> > Class2).
>>> > The projects don't reference each other. Here's my question: can I
>> > serialize Class1 and use the serialized XML in Class2? How would
>> > Class2
>> > de-serialize the XML to retrieve the Class1's properties? I don't see
>> > how
>> > I
>> > can do this since Project2 doesn't even know about Class1.
>>> > The example in MSDN (the Purchase Order Example) shows how to do this
>> > but
>> > with classes in the same project. I want to do it with classes in
>> > different
>> > projects.
>>> > TIA,
>> > --
>> > Joe
>>> > VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
>>
>>
>
Kevin,
Thanks. How would you handle this: DailyReport serializes its data to a
file (or memory stream or whatever). Now, another class (let's call this
class MonthlyReport) - in a different project - wants to de-serialize
DailyReport's data so that it can use it. Assume that MonthlyReport does not
have the same methods, properties, events, etc as DailyReport. How would
you create the XmlSerializer in the Deserializer method in MonthlyReport? Is
this even possible since it has different properties, methods, etc than
DailyReport?
I know how to do this when the class that performs the serialization and
de-serialization is the same class; I'm wondering if it can be done when the
class that serializes is different from the class that de-serializes.
Thanks for all of your help.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Kevin Spencer" wrote:
> Take a look at the sample I posted in reply to the other thread you started.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> Complex things are made up of
> Lots of simple things.
> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
> news:C2005721-C6D0-4A96-AD10-25E8F75D7DF0@.microsoft.com...
> > How. I've never done this.
> > --
> > Joe
> > VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
> > "Bruce Barker" wrote:
> >> write your own serializer.
> >>
> >> -- bruce (sqlwork.com)
> >>
> >>
> >> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
> >> news:DC2EFF4E-2F7E-4689-9223-D0A7B2AF3143@.microsoft.com...
> >> > Hello All:
> >> >> > Say I have a solution with two projects (Project1 and Project2) and
> >> > each
> >> > project contains a class (Project1 contains Class1 and Project2
> >> > contains
> >> > Class2).
> >> >> > The projects don't reference each other. Here's my question: can I
> >> > serialize Class1 and use the serialized XML in Class2? How would
> >> > Class2
> >> > de-serialize the XML to retrieve the Class1's properties? I don't see
> >> > how
> >> > I
> >> > can do this since Project2 doesn't even know about Class1.
> >> >> > The example in MSDN (the Purchase Order Example) shows how to do this
> >> > but
> >> > with classes in the same project. I want to do it with classes in
> >> > different
> >> > projects.
> >> >> > TIA,
> >> > --
> >> > Joe
> >> >> > VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
> >>
> >>
> >>
>
Hi Joe,
I can see where this is heading. Read the following articles and references:
http://msdn.microsoft.com/library/d...rialization.asp
http://msdn.microsoft.com/library/d...lasstopic .asp
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
Complex things are made up of
Lots of simple things.
"Joe" <joeherro@.donotspam.yahoo.com> wrote in message
news:8D2595AF-7D74-4575-8179-BF00494AB219@.microsoft.com...
> Kevin,
> Thanks. How would you handle this: DailyReport serializes its data to a
> file (or memory stream or whatever). Now, another class (let's call this
> class MonthlyReport) - in a different project - wants to de-serialize
> DailyReport's data so that it can use it. Assume that MonthlyReport does
> not
> have the same methods, properties, events, etc as DailyReport. How would
> you create the XmlSerializer in the Deserializer method in MonthlyReport?
> Is
> this even possible since it has different properties, methods, etc than
> DailyReport?
> I know how to do this when the class that performs the serialization and
> de-serialization is the same class; I'm wondering if it can be done when
> the
> class that serializes is different from the class that de-serializes.
> Thanks for all of your help.
> --
> Joe
> VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
>
> "Kevin Spencer" wrote:
>> Take a look at the sample I posted in reply to the other thread you
>> started.
>>
>> --
>> HTH,
>>
>> Kevin Spencer
>> Microsoft MVP
>> ..Net Developer
>> Complex things are made up of
>> Lots of simple things.
>>
>> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
>> news:C2005721-C6D0-4A96-AD10-25E8F75D7DF0@.microsoft.com...
>> > How. I've never done this.
>> > --
>> > Joe
>>> > VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
>>>> > "Bruce Barker" wrote:
>>> >> write your own serializer.
>> >>
>> >> -- bruce (sqlwork.com)
>> >>
>> >>
>> >> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
>> >> news:DC2EFF4E-2F7E-4689-9223-D0A7B2AF3143@.microsoft.com...
>> >> > Hello All:
>> >>> >> > Say I have a solution with two projects (Project1 and Project2) and
>> >> > each
>> >> > project contains a class (Project1 contains Class1 and Project2
>> >> > contains
>> >> > Class2).
>> >>> >> > The projects don't reference each other. Here's my question: can I
>> >> > serialize Class1 and use the serialized XML in Class2? How would
>> >> > Class2
>> >> > de-serialize the XML to retrieve the Class1's properties? I don't
>> >> > see
>> >> > how
>> >> > I
>> >> > can do this since Project2 doesn't even know about Class1.
>> >>> >> > The example in MSDN (the Purchase Order Example) shows how to do
>> >> > this
>> >> > but
>> >> > with classes in the same project. I want to do it with classes in
>> >> > different
>> >> > projects.
>> >>> >> > TIA,
>> >> > --
>> >> > Joe
>> >>> >> > VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
>> >>
>> >>
>> >>
>>
>>
>
Hi Kevin,
Thanks. I've already read these. The examples that they give are for
classes that all exist in the same project. I am asking about serializing a
class in one project and de-serializing it in another project.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Kevin Spencer" wrote:
> Hi Joe,
> I can see where this is heading. Read the following articles and references:
> http://msdn.microsoft.com/library/d...rialization.asp
> http://msdn.microsoft.com/library/d...lasstopic .asp
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> Complex things are made up of
> Lots of simple things.
> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
> news:8D2595AF-7D74-4575-8179-BF00494AB219@.microsoft.com...
> > Kevin,
> > Thanks. How would you handle this: DailyReport serializes its data to a
> > file (or memory stream or whatever). Now, another class (let's call this
> > class MonthlyReport) - in a different project - wants to de-serialize
> > DailyReport's data so that it can use it. Assume that MonthlyReport does
> > not
> > have the same methods, properties, events, etc as DailyReport. How would
> > you create the XmlSerializer in the Deserializer method in MonthlyReport?
> > Is
> > this even possible since it has different properties, methods, etc than
> > DailyReport?
> > I know how to do this when the class that performs the serialization and
> > de-serialization is the same class; I'm wondering if it can be done when
> > the
> > class that serializes is different from the class that de-serializes.
> > Thanks for all of your help.
> > --
> > Joe
> > VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
> > "Kevin Spencer" wrote:
> >> Take a look at the sample I posted in reply to the other thread you
> >> started.
> >>
> >> --
> >> HTH,
> >>
> >> Kevin Spencer
> >> Microsoft MVP
> >> ..Net Developer
> >> Complex things are made up of
> >> Lots of simple things.
> >>
> >> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
> >> news:C2005721-C6D0-4A96-AD10-25E8F75D7DF0@.microsoft.com...
> >> > How. I've never done this.
> >> > --
> >> > Joe
> >> >> > VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
> >> >> >> > "Bruce Barker" wrote:
> >> >> >> write your own serializer.
> >> >>
> >> >> -- bruce (sqlwork.com)
> >> >>
> >> >>
> >> >> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
> >> >> news:DC2EFF4E-2F7E-4689-9223-D0A7B2AF3143@.microsoft.com...
> >> >> > Hello All:
> >> >> >> >> > Say I have a solution with two projects (Project1 and Project2) and
> >> >> > each
> >> >> > project contains a class (Project1 contains Class1 and Project2
> >> >> > contains
> >> >> > Class2).
> >> >> >> >> > The projects don't reference each other. Here's my question: can I
> >> >> > serialize Class1 and use the serialized XML in Class2? How would
> >> >> > Class2
> >> >> > de-serialize the XML to retrieve the Class1's properties? I don't
> >> >> > see
> >> >> > how
> >> >> > I
> >> >> > can do this since Project2 doesn't even know about Class1.
> >> >> >> >> > The example in MSDN (the Purchase Order Example) shows how to do
> >> >> > this
> >> >> > but
> >> >> > with classes in the same project. I want to do it with classes in
> >> >> > different
> >> >> > projects.
> >> >> >> >> > TIA,
> >> >> > --
> >> >> > Joe
> >> >> >> >> > VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
Serializing between two projects
Say I have a solution with two projects (Project1 and Project2) and each
project contains a class (Project1 contains Class1 and Project2 contains
Class2).
The projects don't reference each other. Here's my question: can I
serialize Class1 and use the serialized XML in Class2? How would Class2
de-serialize the XML to retrieve the Class1's properties? I don't see how I
can do this since Project2 doesn't even know about Class1.
The example in MSDN (the Purchase Order Example) shows how to do this but
with classes in the same project. I want to do it with classes in different
projects.
TIA,
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA AutomationSo long as both classes have the same name and the same public
interface, sure. It should deserialize just fine.
What happened when you tried?
Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
Get your own Travel Blog, with itinerary maps and photos!
http://www.blogabond.com/
Jason,
Thanks for writing.
Class1 and Class2 are not the same class. Class2 uses Class1's properties.
For example, Class2 could have a method call where is needs some information
stored in Class1, i.e.
Sub Method2(TextValue as String, SomeClass1Value as Class1.Property1)
'Do something using the Class1's Property1...
End Sub
I need to pass the information contained in Class1 in Project1 to a method
in Class2 in Project2. I can't allow Project2 to reference Project1.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Jason Kester" wrote:
> So long as both classes have the same name and the same public
> interface, sure. It should deserialize just fine.
> What happened when you tried?
> Jason Kester
> Expat Software Consulting Services
> http://www.expatsoftware.com/
> --
> Get your own Travel Blog, with itinerary maps and photos!
> http://www.blogabond.com/
>
write your own serializer.
-- bruce (sqlwork.com)
"Joe" <joeherro@.donotspam.yahoo.com> wrote in message
news:DC2EFF4E-2F7E-4689-9223-D0A7B2AF3143@.microsoft.com...
> Hello All:
> Say I have a solution with two projects (Project1 and Project2) and each
> project contains a class (Project1 contains Class1 and Project2 contains
> Class2).
> The projects don't reference each other. Here's my question: can I
> serialize Class1 and use the serialized XML in Class2? How would Class2
> de-serialize the XML to retrieve the Class1's properties? I don't see how
> I
> can do this since Project2 doesn't even know about Class1.
> The example in MSDN (the Purchase Order Example) shows how to do this but
> with classes in the same project. I want to do it with classes in
> different
> projects.
> TIA,
> --
> Joe
> VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
How. I've never done this.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Bruce Barker" wrote:
> write your own serializer.
> -- bruce (sqlwork.com)
>
> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
> news:DC2EFF4E-2F7E-4689-9223-D0A7B2AF3143@.microsoft.com...
>
>
Take a look at the sample I posted in reply to the other thread you started.
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Complex things are made up of
Lots of simple things.
"Joe" <joeherro@.donotspam.yahoo.com> wrote in message
news:C2005721-C6D0-4A96-AD10-25E8F75D7DF0@.microsoft.com...
> How. I've never done this.
> --
> Joe
> VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
>
> "Bruce Barker" wrote:
>
Kevin,
Thanks. How would you handle this: DailyReport serializes its data to a
file (or memory stream or whatever). Now, another class (let's call this
class MonthlyReport) - in a different project - wants to de-serialize
DailyReport's data so that it can use it. Assume that MonthlyReport does no
t
have the same methods, properties, events, etc as DailyReport. How would
you create the XmlSerializer in the Deserializer method in MonthlyReport? I
s
this even possible since it has different properties, methods, etc than
DailyReport?
I know how to do this when the class that performs the serialization and
de-serialization is the same class; I'm wondering if it can be done when the
class that serializes is different from the class that de-serializes.
Thanks for all of your help.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Kevin Spencer" wrote:
> Take a look at the sample I posted in reply to the other thread you starte
d.
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> Complex things are made up of
> Lots of simple things.
> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
> news:C2005721-C6D0-4A96-AD10-25E8F75D7DF0@.microsoft.com...
>
>
Hi Joe,
I can see where this is heading. Read the following articles and references:
http://msdn.microsoft.com/library/d...rialization.asp
http://msdn.microsoft.com/library/d...
opic.asp
HTH,
Kevin Spencer
Microsoft MVP
.Net Developer
Complex things are made up of
Lots of simple things.
"Joe" <joeherro@.donotspam.yahoo.com> wrote in message
news:8D2595AF-7D74-4575-8179-BF00494AB219@.microsoft.com...
> Kevin,
> Thanks. How would you handle this: DailyReport serializes its data to a
> file (or memory stream or whatever). Now, another class (let's call this
> class MonthlyReport) - in a different project - wants to de-serialize
> DailyReport's data so that it can use it. Assume that MonthlyReport does
> not
> have the same methods, properties, events, etc as DailyReport. How would
> you create the XmlSerializer in the Deserializer method in MonthlyReport?
> Is
> this even possible since it has different properties, methods, etc than
> DailyReport?
> I know how to do this when the class that performs the serialization and
> de-serialization is the same class; I'm wondering if it can be done when
> the
> class that serializes is different from the class that de-serializes.
> Thanks for all of your help.
> --
> Joe
> VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
>
> "Kevin Spencer" wrote:
>
Hi Kevin,
Thanks. I've already read these. The examples that they give are for
classes that all exist in the same project. I am asking about serializing a
class in one project and de-serializing it in another project.
--
Joe
VB.NET/C#/ASP.NET/ASP/VB/C++/Web and DB development/VBA Automation
"Kevin Spencer" wrote:
> Hi Joe,
> I can see where this is heading. Read the following articles and reference
s:
> http://msdn.microsoft.com/library/d...rialization.asp
> http://msdn.microsoft.com/library/d...r />
stopic.asp
> --
> HTH,
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> Complex things are made up of
> Lots of simple things.
> "Joe" <joeherro@.donotspam.yahoo.com> wrote in message
> news:8D2595AF-7D74-4575-8179-BF00494AB219@.microsoft.com...
>
>
Tuesday, March 13, 2012
server application unavailable
i'm going to ask a solution for a "classic" problem. actually i read a
lot about possible solutions to it but i was not able to solve it.
the "patient" is:
- a test server where i have "limited" power (alias, i cannot re-
install everything i want :-/)
- Windows 2000 sp 4 w/ iis 5.0
- .net frameworks installed: 1.0, 1.1, 2.0
- a bunch of *working* webapplications associated w/ framework 1.1
- a web application which does not work associated w/ framework 2.0 (i
checked the associations with the ASPNETVersionSwitcher tool)
symptoms:
- when i load the not-working application via browser, i get the red
error message "Server Application Unavailable"
- i checked the Event Viewer, here is what it says:
1. aspnet_wp.exe (PID: 2620) stopped unexpectedly.
2. Failed to execute the request because the ASP.NET process identity
does not have read permissions to the global assembly cache. Error:
0x80004005 Unspecified error
what i did:
- i read these two articles telling how to set the permission for
<machinename>\ASPNET account:
http://forums.microsoft.com/MSDN/Sh...135969&SiteID=1
http://support.microsoft.com/?scid=...B811320&x=9&y=9
still, after having set the permissions as the articles say, the
problem still remains.
do you have any other suggestions?
francesco
PS
all the guides i read say that after installing .net framework v2.0 it
should appear a tab titled "ASP.NET" in the iis web site property
page... that does not happen to me. is that normal?Last time I had error like that ASP.NET did not have any permissions (I
think all it need is read) to the BIN folder of my application
George.
"Francesco Spegni" <francesco.spegni@.gmail.com> wrote in message
news:1174993540.662501.226120@.l77g2000hsb.googlegroups.com...
> hallo,
> i'm going to ask a solution for a "classic" problem. actually i read a
> lot about possible solutions to it but i was not able to solve it.
> the "patient" is:
> - a test server where i have "limited" power (alias, i cannot re-
> install everything i want :-/)
> - Windows 2000 sp 4 w/ iis 5.0
> - .net frameworks installed: 1.0, 1.1, 2.0
> - a bunch of *working* webapplications associated w/ framework 1.1
> - a web application which does not work associated w/ framework 2.0 (i
> checked the associations with the ASPNETVersionSwitcher tool)
> symptoms:
> - when i load the not-working application via browser, i get the red
> error message "Server Application Unavailable"
> - i checked the Event Viewer, here is what it says:
> 1. aspnet_wp.exe (PID: 2620) stopped unexpectedly.
> 2. Failed to execute the request because the ASP.NET process identity
> does not have read permissions to the global assembly cache. Error:
> 0x80004005 Unspecified error
> what i did:
> - i read these two articles telling how to set the permission for
> <machinename>\ASPNET account:
> http://forums.microsoft.com/MSDN/Sh...135969&SiteID=1
> http://support.microsoft.com/?scid=...B811320&x=9&y=9
> still, after having set the permissions as the articles say, the
> problem still remains.
> do you have any other suggestions?
> francesco
> PS
> all the guides i read say that after installing .net framework v2.0 it
> should appear a tab titled "ASP.NET" in the iis web site property
> page... that does not happen to me. is that normal?
>
thanks, but the user (<machine_name>/ASPNET) has access to the bin
directory :-/
On 27 Mar, 13:38, "George Ter-Saakov" <gt-...@.cardone.com> wrote:
> Last time I had error like that ASP.NET did not have any permissions (I
> think all it need is read) to the BIN folder of my application
> George.
> "Francesco Spegni" <francesco.spe...@.gmail.com> wrote in message
> news:1174993540.662501.226120@.l77g2000hsb.googlegroups.com...
>
I think you answered your own question. the ASPNET process cannot read the
GAC. So you need to find out how to grant the proper permissions.
Sounds like you've got a messed up installation. Also, make sure your 2.0
app(s) are running under their OWN application pool.
Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Francesco Spegni" wrote:
> hallo,
> i'm going to ask a solution for a "classic" problem. actually i read a
> lot about possible solutions to it but i was not able to solve it.
> the "patient" is:
> - a test server where i have "limited" power (alias, i cannot re-
> install everything i want :-/)
> - Windows 2000 sp 4 w/ iis 5.0
> - .net frameworks installed: 1.0, 1.1, 2.0
> - a bunch of *working* webapplications associated w/ framework 1.1
> - a web application which does not work associated w/ framework 2.0 (i
> checked the associations with the ASPNETVersionSwitcher tool)
> symptoms:
> - when i load the not-working application via browser, i get the red
> error message "Server Application Unavailable"
> - i checked the Event Viewer, here is what it says:
> 1. aspnet_wp.exe (PID: 2620) stopped unexpectedly.
> 2. Failed to execute the request because the ASP.NET process identity
> does not have read permissions to the global assembly cache. Error:
> 0x80004005 Unspecified error
> what i did:
> - i read these two articles telling how to set the permission for
> <machinename>\ASPNET account:
> http://forums.microsoft.com/MSDN/Sh...135969&SiteID=1
> http://support.microsoft.com/?scid=...B811320&x=9&y=9
> still, after having set the permissions as the articles say, the
> problem still remains.
> do you have any other suggestions?
> francesco
> PS
> all the guides i read say that after installing .net framework v2.0 it
> should appear a tab titled "ASP.NET" in the iis web site property
> page... that does not happen to me. is that normal?
>
On 28 Mar, 01:01, Peter Bromberg [C# MVP]
<pbromb...@.yahoo.yabbadabbadoo.com> wrote:
> I think you answered your own question. the ASPNET process cannot read the
> GAC. So you need to find out how to grant the proper permissions.
> Sounds like you've got a messed up installation. Also, make sure your 2.0
> app(s) are running under their OWN application pool.
> Peter
uhm,
i'm not an expert in iis but i think that application pools are
configurable for iis 6 or successive ones, while i'm using iis 5. am i
wrong? if i'm wrong, could you point me to some documentation about
that?
moreover: which files is the GAC made of, actually? just the ones in
%windir%\assembly? i'm asking you this because i've already checked
they are readable by ASPNET user.
thanks
francesco