writing to a remote event log.....

Discussion in 'ASP .Net' started by Ollie, Apr 22, 2004.

  1. Ollie

    Ollie Guest

    okay sorry for cross posting but want to see if any one can explain the
    solution to this problem for me:

    I have a .Net ASP.Net app written in C# that use COM+ components to do some
    business processing......

    When I have the ASP.Net website and the COM+ components installed on the
    same machine (i.e everything local) it all works fine, and it can write to
    the event log....

    But when I moved the COM+ component onto a remote application server I get
    the following error when the COM+ service attempts to write to a remote
    event log.

    A first chance exception of type 'System.InvalidOperationException' occurred
    in mscorlib.dll

    Additional information: Cannot open log for source {0}. You may not have
    write access.

    Can anyone tell me how to cofig the event log so that the remote COM+
    service can write to this event log.

    All servers in my architecture are running windows 2003 server. I know that
    the COM+ service is running correctly because several calls i have made to
    the component have completed correctly, but when a particular method fails
    and attempt to wirte to the remote Event log it fails and the exception is
    generated in the ASP.Net application saying the above, this indicates that
    it can not write to the event log does it?

    Cheers in advance

    Ollie
    Ollie, Apr 22, 2004
    #1
    1. Advertising

  2. Everybody who cross-posts has a reason for doing so. However, nobody has a
    RIGHT reason for doing so.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Ollie" <> wrote in message
    news:...
    > okay sorry for cross posting but want to see if any one can explain the
    > solution to this problem for me:
    >
    > I have a .Net ASP.Net app written in C# that use COM+ components to do

    some
    > business processing......
    >
    > When I have the ASP.Net website and the COM+ components installed on the
    > same machine (i.e everything local) it all works fine, and it can write to
    > the event log....
    >
    > But when I moved the COM+ component onto a remote application server I get
    > the following error when the COM+ service attempts to write to a remote
    > event log.
    >
    > A first chance exception of type 'System.InvalidOperationException'

    occurred
    > in mscorlib.dll
    >
    > Additional information: Cannot open log for source {0}. You may not have
    > write access.
    >
    > Can anyone tell me how to cofig the event log so that the remote COM+
    > service can write to this event log.
    >
    > All servers in my architecture are running windows 2003 server. I know

    that
    > the COM+ service is running correctly because several calls i have made to
    > the component have completed correctly, but when a particular method fails
    > and attempt to wirte to the remote Event log it fails and the exception is
    > generated in the ASP.Net application saying the above, this indicates

    that
    > it can not write to the event log does it?
    >
    > Cheers in advance
    >
    > Ollie
    >
    >
    Kevin Spencer, Apr 22, 2004
    #2
    1. Advertising

  3. Ollie

    Ollie Guest

    how about "Big things are made up of useful things........"
    or better still
    "Big things are made up from useful help from lots of people........"


    "Kevin Spencer" <> wrote in message
    news:%...
    > Everybody who cross-posts has a reason for doing so. However, nobody has a
    > RIGHT reason for doing so.
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "Ollie" <> wrote in message
    > news:...
    > > okay sorry for cross posting but want to see if any one can explain the
    > > solution to this problem for me:
    > >
    > > I have a .Net ASP.Net app written in C# that use COM+ components to do

    > some
    > > business processing......
    > >
    > > When I have the ASP.Net website and the COM+ components installed on the
    > > same machine (i.e everything local) it all works fine, and it can write

    to
    > > the event log....
    > >
    > > But when I moved the COM+ component onto a remote application server I

    get
    > > the following error when the COM+ service attempts to write to a remote
    > > event log.
    > >
    > > A first chance exception of type 'System.InvalidOperationException'

    > occurred
    > > in mscorlib.dll
    > >
    > > Additional information: Cannot open log for source {0}. You may not have
    > > write access.
    > >
    > > Can anyone tell me how to cofig the event log so that the remote COM+
    > > service can write to this event log.
    > >
    > > All servers in my architecture are running windows 2003 server. I know

    > that
    > > the COM+ service is running correctly because several calls i have made

    to
    > > the component have completed correctly, but when a particular method

    fails
    > > and attempt to wirte to the remote Event log it fails and the exception

    is
    > > generated in the ASP.Net application saying the above, this indicates

    > that
    > > it can not write to the event log does it?
    > >
    > > Cheers in advance
    > >
    > > Ollie
    > >
    > >

    >
    >
    Ollie, Apr 22, 2004
    #3
  4. This is a security issue, check if the identity of the COM+ server has the
    right privileges to access the remote eventlog.
    But you should ask yourself why an application running on lets say serverA
    should write to the eventlog of serverB.

    Willy.

    "Ollie" <> wrote in message
    news:...
    > okay sorry for cross posting but want to see if any one can explain the
    > solution to this problem for me:
    >
    > I have a .Net ASP.Net app written in C# that use COM+ components to do
    > some
    > business processing......
    >
    > When I have the ASP.Net website and the COM+ components installed on the
    > same machine (i.e everything local) it all works fine, and it can write to
    > the event log....
    >
    > But when I moved the COM+ component onto a remote application server I get
    > the following error when the COM+ service attempts to write to a remote
    > event log.
    >
    > A first chance exception of type 'System.InvalidOperationException'
    > occurred
    > in mscorlib.dll
    >
    > Additional information: Cannot open log for source {0}. You may not have
    > write access.
    >
    > Can anyone tell me how to cofig the event log so that the remote COM+
    > service can write to this event log.
    >
    > All servers in my architecture are running windows 2003 server. I know
    > that
    > the COM+ service is running correctly because several calls i have made to
    > the component have completed correctly, but when a particular method fails
    > and attempt to wirte to the remote Event log it fails and the exception is
    > generated in the ASP.Net application saying the above, this indicates
    > that
    > it can not write to the event log does it?
    >
    > Cheers in advance
    >
    > Ollie
    >
    >
    Willy Denoyette [MVP], Apr 22, 2004
    #4
  5. Ollie

    Ollie Guest

    Infact I will tell you why i crossed posted:

    1. It's an asp.net app so it seems reason to post here and I don't whether
    this is an asp.net issue.....
    2. It's an asp.net that contains COM+ components and I don't whether this is
    a com+ issue.....
    3. It's all written in C# .net and I don't whether this is a C# issue.....
    4. And..... what the hell I will ask in the COM+ newsgroup because may be
    this is not a .Net managed environment issue but a general rights issue with
    windows 2003

    Ollie.

    PS - why do you have an MVP is it to help other people who are trying to
    solve problems when they can't see the wood for the tree's or is it because
    you just want geek fame and big yourself up?

    Because if you are an example of the current MVP's then god help us......

    Have A Nice Day....



    "Kevin Spencer" <> wrote in message
    news:%...
    > Everybody who cross-posts has a reason for doing so. However, nobody has a
    > RIGHT reason for doing so.
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "Ollie" <> wrote in message
    > news:...
    > > okay sorry for cross posting but want to see if any one can explain the
    > > solution to this problem for me:
    > >
    > > I have a .Net ASP.Net app written in C# that use COM+ components to do

    > some
    > > business processing......
    > >
    > > When I have the ASP.Net website and the COM+ components installed on the
    > > same machine (i.e everything local) it all works fine, and it can write

    to
    > > the event log....
    > >
    > > But when I moved the COM+ component onto a remote application server I

    get
    > > the following error when the COM+ service attempts to write to a remote
    > > event log.
    > >
    > > A first chance exception of type 'System.InvalidOperationException'

    > occurred
    > > in mscorlib.dll
    > >
    > > Additional information: Cannot open log for source {0}. You may not have
    > > write access.
    > >
    > > Can anyone tell me how to cofig the event log so that the remote COM+
    > > service can write to this event log.
    > >
    > > All servers in my architecture are running windows 2003 server. I know

    > that
    > > the COM+ service is running correctly because several calls i have made

    to
    > > the component have completed correctly, but when a particular method

    fails
    > > and attempt to wirte to the remote Event log it fails and the exception

    is
    > > generated in the ASP.Net application saying the above, this indicates

    > that
    > > it can not write to the event log does it?
    > >
    > > Cheers in advance
    > >
    > > Ollie
    > >
    > >

    >
    >
    Ollie, Apr 22, 2004
    #5
  6. Ollie

    Ollie Guest

    thanks for the answer Willy,

    The reason that it is using a remote event log is because you can't have a
    ..net config file for a COM+ (as I understand the current status of COM+)
    service component and what i did instead was to pass the event log
    information from the asp.net and tell the remote COM+ component to write
    that event log if an error occurs....

    Cheers

    Ollie


    "Willy Denoyette [MVP]" <> wrote in message
    news:...
    > This is a security issue, check if the identity of the COM+ server has the
    > right privileges to access the remote eventlog.
    > But you should ask yourself why an application running on lets say serverA
    > should write to the eventlog of serverB.
    >
    > Willy.
    >
    > "Ollie" <> wrote in message
    > news:...
    > > okay sorry for cross posting but want to see if any one can explain the
    > > solution to this problem for me:
    > >
    > > I have a .Net ASP.Net app written in C# that use COM+ components to do
    > > some
    > > business processing......
    > >
    > > When I have the ASP.Net website and the COM+ components installed on the
    > > same machine (i.e everything local) it all works fine, and it can write

    to
    > > the event log....
    > >
    > > But when I moved the COM+ component onto a remote application server I

    get
    > > the following error when the COM+ service attempts to write to a remote
    > > event log.
    > >
    > > A first chance exception of type 'System.InvalidOperationException'
    > > occurred
    > > in mscorlib.dll
    > >
    > > Additional information: Cannot open log for source {0}. You may not have
    > > write access.
    > >
    > > Can anyone tell me how to cofig the event log so that the remote COM+
    > > service can write to this event log.
    > >
    > > All servers in my architecture are running windows 2003 server. I know
    > > that
    > > the COM+ service is running correctly because several calls i have made

    to
    > > the component have completed correctly, but when a particular method

    fails
    > > and attempt to wirte to the remote Event log it fails and the exception

    is
    > > generated in the ASP.Net application saying the above, this indicates
    > > that
    > > it can not write to the event log does it?
    > >
    > > Cheers in advance
    > >
    > > Ollie
    > >
    > >

    >
    >
    Ollie, Apr 22, 2004
    #6
  7. Ollie

    GL Guest

    In 2003, there are special permissions for who can write to the eventlog.
    This may be part of your problem. Also, the ASP.Net worker process by
    default does not have the registry permissions to create a new eventlog
    source.

    This page may help you, It helped me.
    http://support.microsoft.com/default.aspx?scid=kb;en-us;323076

    GL

    "Ollie" <> wrote in message
    news:...
    > okay sorry for cross posting but want to see if any one can explain the
    > solution to this problem for me:
    >
    > I have a .Net ASP.Net app written in C# that use COM+ components to do

    some
    > business processing......
    >
    > When I have the ASP.Net website and the COM+ components installed on the
    > same machine (i.e everything local) it all works fine, and it can write to
    > the event log....
    >
    > But when I moved the COM+ component onto a remote application server I get
    > the following error when the COM+ service attempts to write to a remote
    > event log.
    >
    > A first chance exception of type 'System.InvalidOperationException'

    occurred
    > in mscorlib.dll
    >
    > Additional information: Cannot open log for source {0}. You may not have
    > write access.
    >
    > Can anyone tell me how to cofig the event log so that the remote COM+
    > service can write to this event log.
    >
    > All servers in my architecture are running windows 2003 server. I know

    that
    > the COM+ service is running correctly because several calls i have made to
    > the component have completed correctly, but when a particular method fails
    > and attempt to wirte to the remote Event log it fails and the exception is
    > generated in the ASP.Net application saying the above, this indicates

    that
    > it can not write to the event log does it?
    >
    > Cheers in advance
    >
    > Ollie
    >
    >
    GL, Apr 22, 2004
    #7
  8. Ollie

    Ollie Guest

    cheers GL.....

    I already have the settings to allow the local asp.net app to create and
    write to the event log, the remote process can't currently write to a remote
    event log

    Ollie


    "GL" <> wrote in message
    news:...
    > In 2003, there are special permissions for who can write to the eventlog.
    > This may be part of your problem. Also, the ASP.Net worker process by
    > default does not have the registry permissions to create a new eventlog
    > source.
    >
    > This page may help you, It helped me.
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;323076
    >
    > GL
    >
    > "Ollie" <> wrote in message
    > news:...
    > > okay sorry for cross posting but want to see if any one can explain the
    > > solution to this problem for me:
    > >
    > > I have a .Net ASP.Net app written in C# that use COM+ components to do

    > some
    > > business processing......
    > >
    > > When I have the ASP.Net website and the COM+ components installed on the
    > > same machine (i.e everything local) it all works fine, and it can write

    to
    > > the event log....
    > >
    > > But when I moved the COM+ component onto a remote application server I

    get
    > > the following error when the COM+ service attempts to write to a remote
    > > event log.
    > >
    > > A first chance exception of type 'System.InvalidOperationException'

    > occurred
    > > in mscorlib.dll
    > >
    > > Additional information: Cannot open log for source {0}. You may not have
    > > write access.
    > >
    > > Can anyone tell me how to cofig the event log so that the remote COM+
    > > service can write to this event log.
    > >
    > > All servers in my architecture are running windows 2003 server. I know

    > that
    > > the COM+ service is running correctly because several calls i have made

    to
    > > the component have completed correctly, but when a particular method

    fails
    > > and attempt to wirte to the remote Event log it fails and the exception

    is
    > > generated in the ASP.Net application saying the above, this indicates

    > that
    > > it can not write to the event log does it?
    > >
    > > Cheers in advance
    > >
    > > Ollie
    > >
    > >

    >
    >
    Ollie, Apr 22, 2004
    #8
  9. If you think that p***ing people off is going to be useful to you, go ahead
    and call my advice useless. Netiquette exists for a reason, and my advice is
    there to help you continue to get answers when you need them. I believe that
    teaching a man to fish is much more valuable than giving a man a fish. Go
    figure.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Ollie" <why do they need this!!!!> wrote in message
    news:#...
    > how about "Big things are made up of useful things........"
    > or better still
    > "Big things are made up from useful help from lots of people........"
    >
    >
    > "Kevin Spencer" <> wrote in message
    > news:%...
    > > Everybody who cross-posts has a reason for doing so. However, nobody has

    a
    > > RIGHT reason for doing so.
    > >
    > > --
    > > HTH,
    > > Kevin Spencer
    > > .Net Developer
    > > Microsoft MVP
    > > Big things are made up
    > > of lots of little things.
    > >
    > > "Ollie" <> wrote in message
    > > news:...
    > > > okay sorry for cross posting but want to see if any one can explain

    the
    > > > solution to this problem for me:
    > > >
    > > > I have a .Net ASP.Net app written in C# that use COM+ components to do

    > > some
    > > > business processing......
    > > >
    > > > When I have the ASP.Net website and the COM+ components installed on

    the
    > > > same machine (i.e everything local) it all works fine, and it can

    write
    > to
    > > > the event log....
    > > >
    > > > But when I moved the COM+ component onto a remote application server I

    > get
    > > > the following error when the COM+ service attempts to write to a

    remote
    > > > event log.
    > > >
    > > > A first chance exception of type 'System.InvalidOperationException'

    > > occurred
    > > > in mscorlib.dll
    > > >
    > > > Additional information: Cannot open log for source {0}. You may not

    have
    > > > write access.
    > > >
    > > > Can anyone tell me how to cofig the event log so that the remote COM+
    > > > service can write to this event log.
    > > >
    > > > All servers in my architecture are running windows 2003 server. I

    know
    > > that
    > > > the COM+ service is running correctly because several calls i have

    made
    > to
    > > > the component have completed correctly, but when a particular method

    > fails
    > > > and attempt to wirte to the remote Event log it fails and the

    exception
    > is
    > > > generated in the ASP.Net application saying the above, this indicates

    > > that
    > > > it can not write to the event log does it?
    > > >
    > > > Cheers in advance
    > > >
    > > > Ollie
    > > >
    > > >

    > >
    > >

    >
    >
    Kevin Spencer, Apr 22, 2004
    #9
  10. Ollie

    Ollie Guest

    I wonder if I can report MVP's for the 'wrong' attitude and generally being
    useless and therefore not being a 'VALUED PROFESSIONAL'......

    because I am now off to search the MVP site for such a link.....

    Have A Nice Day...

    FYI - Willy Denoyette [MVP] provide a very useful short and precise answer
    that helped the problem greatly. I suggest you have a lot to learn about
    'HELPING' people, having a pro-active answer is what is required not a
    negative unhelpful answer, I guess you get more MVP 'points' by the number
    of replies you post not the quality.....



    "Kevin Spencer" <> wrote in message
    news:...
    > If you think that p***ing people off is going to be useful to you, go

    ahead
    > and call my advice useless. Netiquette exists for a reason, and my advice

    is
    > there to help you continue to get answers when you need them. I believe

    that
    > teaching a man to fish is much more valuable than giving a man a fish. Go
    > figure.
    >
    > --
    > HTH,
    > Kevin Spencer
    > .Net Developer
    > Microsoft MVP
    > Big things are made up
    > of lots of little things.
    >
    > "Ollie" <why do they need this!!!!> wrote in message
    > news:#...
    > > how about "Big things are made up of useful things........"
    > > or better still
    > > "Big things are made up from useful help from lots of people........"
    > >
    > >
    > > "Kevin Spencer" <> wrote in message
    > > news:%...
    > > > Everybody who cross-posts has a reason for doing so. However, nobody

    has
    > a
    > > > RIGHT reason for doing so.
    > > >
    > > > --
    > > > HTH,
    > > > Kevin Spencer
    > > > .Net Developer
    > > > Microsoft MVP
    > > > Big things are made up
    > > > of lots of little things.
    > > >
    > > > "Ollie" <> wrote in message
    > > > news:...
    > > > > okay sorry for cross posting but want to see if any one can explain

    > the
    > > > > solution to this problem for me:
    > > > >
    > > > > I have a .Net ASP.Net app written in C# that use COM+ components to

    do
    > > > some
    > > > > business processing......
    > > > >
    > > > > When I have the ASP.Net website and the COM+ components installed on

    > the
    > > > > same machine (i.e everything local) it all works fine, and it can

    > write
    > > to
    > > > > the event log....
    > > > >
    > > > > But when I moved the COM+ component onto a remote application server

    I
    > > get
    > > > > the following error when the COM+ service attempts to write to a

    > remote
    > > > > event log.
    > > > >
    > > > > A first chance exception of type 'System.InvalidOperationException'
    > > > occurred
    > > > > in mscorlib.dll
    > > > >
    > > > > Additional information: Cannot open log for source {0}. You may not

    > have
    > > > > write access.
    > > > >
    > > > > Can anyone tell me how to cofig the event log so that the remote

    COM+
    > > > > service can write to this event log.
    > > > >
    > > > > All servers in my architecture are running windows 2003 server. I

    > know
    > > > that
    > > > > the COM+ service is running correctly because several calls i have

    > made
    > > to
    > > > > the component have completed correctly, but when a particular method

    > > fails
    > > > > and attempt to wirte to the remote Event log it fails and the

    > exception
    > > is
    > > > > generated in the ASP.Net application saying the above, this

    indicates
    > > > that
    > > > > it can not write to the event log does it?
    > > > >
    > > > > Cheers in advance
    > > > >
    > > > > Ollie
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Ollie, Apr 22, 2004
    #10
  11. Ollie

    pobby69

    Joined:
    Nov 14, 2008
    Messages:
    1
    I agree with Ollie, Kevin's post was a waste of time. To say "go ahead
    and call my advice useless" is laughable - you didn't give ANY advice Kevin!!

    Thank goodness there are MVPs around who do not suffer from the I-am-God complex who think it's fine to post silly comments instead of helping by giving advice or directing to further resources to read. By doing the latter, the GOOD MVP will teaching others to fish, not smacking them in the face with a fish they caught years ago which they dearly hang on to.
    pobby69, Nov 14, 2008
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henrik_the_boss
    Replies:
    0
    Views:
    2,623
    Henrik_the_boss
    Nov 5, 2003
  2. =?Utf-8?B?TWFyaw==?=

    Access Event log on remote computer

    =?Utf-8?B?TWFyaw==?=, Mar 3, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    527
    Natty Gur
    Mar 4, 2004
  3. =?Utf-8?B?VG9tIFdpbmdlcnQ=?=

    My.Log.Writeexception not writing to Application Event Log.

    =?Utf-8?B?VG9tIFdpbmdlcnQ=?=, Jan 20, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,346
    =?Utf-8?B?VG9tIFdpbmdlcnQ=?=
    Jan 20, 2006
  4. Tom Wingert
    Replies:
    0
    Views:
    316
    Tom Wingert
    Jan 12, 2006
  5. Replies:
    0
    Views:
    1,246
Loading...

Share This Page