CDOSYS NNTP

R

Roland Hall

Is it possible to send/receive nntp messages via CDOSYS without a 3rd party
news component? The NNTP links I have found appear to be related to MS
Exchange 2K.

My goal is to write an ASP interface as a customized news reader.

Roland
 
E

Egbert Nierop \(MVP for IIS\)

Roland Hall said:
Is it possible to send/receive nntp messages via CDOSYS without a 3rd party
news component? The NNTP links I have found appear to be related to MS
Exchange 2K.

My goal is to write an ASP interface as a customized news reader.

Yes!
This is perfectly possible. Outlook Express, also uses -the same- component.
 
R

Roland Hall

in message
: : > Is it possible to send/receive nntp messages via CDOSYS without a 3rd
: party
: > news component? The NNTP links I have found appear to be related to MS
: > Exchange 2K.
: >
: > My goal is to write an ASP interface as a customized news reader.
:
: Yes!
: This is perfectly possible. Outlook Express, also uses -the same-
component.

Hi Egbert...

Can you shed some light on where I can find documentation on this? It is my
understanding that Exchange would have to be on the same server and I had
hoped this was not a requirement. I cannot find any definitive information
anywhere.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
E

Egbert Nierop \(MVP for IIS\)

Roland Hall said:
in message
: : > Is it possible to send/receive nntp messages via CDOSYS without a 3rd
: party
: > news component? The NNTP links I have found appear to be related to MS
: > Exchange 2K.
: >
: > My goal is to write an ASP interface as a customized news reader.
:
: Yes!
: This is perfectly possible. Outlook Express, also uses -the same-
component.

Hi Egbert...

Can you shed some light on where I can find documentation on this? It is my
understanding that Exchange would have to be on the same server and I had
hoped this was not a requirement. I cannot find any definitive information
anywhere.

That's not correct. As I said, CDO is installed on for instance XP, and I
have -no- Exchange on my system. Outlook Express uses CDO to post and to
read messages.
But as soon as you install Exchange on a server, it will replace the
original CDO and add additional functionailty, that you don't need to
imitate 'outlook express'.

About documentation, it's not fully documented but not impossible to find
out. The typelibrary is very extended and if you get comfortable using that
API, you also easy can post and read from NNTP servers.





http://msdn.microsoft.com/library/d...ss/posting_a_message_to_an_nntp_newsgroup.asp

Private Sub POST_NEWS_MESSAGE()
Dim Msg As New CDO.Message
Dim Cfg As New CDO.Configuration

Cfg.Fields("http://schemas.microsoft.com/cdo/configuration/postusing").Value
= 2
Cfg.Fields("http://schemas.microsoft.com/cdo/configuration/nntpserver").Valu
e = "yournntpserver"

Cfg.Fields.Update
Set Msg.Configuration = Cfg

Msg.Subject = "Hello"
Msg.From = "(e-mail address removed)"
Msg.Newsgroups = "yournewsgroup"
Msg.Post

End Sub
 
R

Roland Hall

in message
: "Roland Hall" wrote in message
: : > "Egbert Nierop (MVP for IIS)" wrote in message
: > : > : "Roland Hall" wrote in message
: > : : > : > Is it possible to send/receive nntp messages via CDOSYS without a
3rd
: > : party
: > : > news component? The NNTP links I have found appear to be related to
: MS
: > : > Exchange 2K.
: > : >
: > : > My goal is to write an ASP interface as a customized news reader.
: > :
: > : Yes!
: > : This is perfectly possible. Outlook Express, also uses -the same-
: > component.
: >
: > Hi Egbert...
: >
: > Can you shed some light on where I can find documentation on this? It
is
: my
: > understanding that Exchange would have to be on the same server and I
had
: > hoped this was not a requirement. I cannot find any definitive
: information
: > anywhere.
:
: That's not correct. As I said, CDO is installed on for instance XP, and I
: have -no- Exchange on my system. Outlook Express uses CDO to post and to
: read messages.
: But as soon as you install Exchange on a server, it will replace the
: original CDO and add additional functionailty, that you don't need to
: imitate 'outlook express'.
:
: About documentation, it's not fully documented but not impossible to find
: out. The typelibrary is very extended and if you get comfortable using
that
: API, you also easy can post and read from NNTP servers.
:
:
http://msdn.microsoft.com/library/d...ss/posting_a_message_to_an_nntp_newsgroup.asp
:
: Private Sub POST_NEWS_MESSAGE()
: Dim Msg As New CDO.Message
: Dim Cfg As New CDO.Configuration
:
:
Cfg.Fields("http://schemas.microsoft.com/cdo/configuration/postusing").Value
: = 2
:
Cfg.Fields("http://schemas.microsoft.com/cdo/configuration/nntpserver").Valu
: e = "yournntpserver"
:
: Cfg.Fields.Update
: Set Msg.Configuration = Cfg
:
: Msg.Subject = "Hello"
: Msg.From = "(e-mail address removed)"
: Msg.Newsgroups = "yournewsgroup"
: Msg.Post
:
: End Sub

Egbert...

Thanks for responding but this appears to be VB, not VBScript to be used
with ASP. I made some modifications and I got it working but it still needs
some work and now I need to find out how to get the messages and display
them and then write my interface.

Here is what I have currently. I posted this message in the test area.

<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = True

Const cdoPostUsingPort = 2
Const cdoPostUsingMethod =
"http://schemas.microsoft.com/cdo/configuration/postusing"
Const cdoNNTPServer =
"http://schemas.microsoft.com/cdo/configuration/nntpserver"
Const cdoNNTPServerPort =
"http://schemas.microsoft.com/cdo/configuration/nntpserverport"
Const cdoNNTPConnectionTimeout =
"http://schemas.microsoft.com/cdo/configuration/nntpconnectiontimeout"
Const cdoNNTPAuthenticate =
"http://schemas.microsoft.com/cdo/configuration/nntpauthenticate"
Const cdoPostEmailAddress =
"http://schemas.microsoft.com/cdo/configuration/postemailaddress"

Private Sub Post_News_Message()
Dim Cfg, Fields, Msg
Set Cfg = Server.CreateObject("CDO.Configuration")
Set Fields = Cfg.Fields
Set Msg = Server.CreateObject("CDO.Message")

With Fields
.Item(cdoPostUsingMethod) = cdoPostUsingPort
.Item(cdoNNTPServer) = "msnews.microsoft.com"
.Item(cdoNNTPServerPort) = 119
.Item(cdoNNTPConnectionTimeout) = 10
.Update
End With

With Msg
.Configuration = Cfg
.Newsgroups = "microsoft.test"
.From = "nobody@nowhere"
.Subject = "NNTP Test"
.TextBody = "NNTP Test Sent @ " & Now()
.Post
End With

Set Fields = Nothing
Set Msg = Nothing
Set Cfg = Nothing

End Sub
Post_News_Message
%>

I posted another message after this, after I modified my .From and it went
to the same thread. Do you know if this is based on the subject?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
E

Egbert Nierop \(MVP for IIS\)

Roland Hall said:
in message

Egbert...

Thanks for responding but this appears to be VB, not VBScript to be used
with ASP. I made some modifications and I got it working but it still needs
some work and now I need to find out how to get the messages and display
them and then write my interface.

Here is what I have currently. I posted this message in the test area.

<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = True

Const cdoPostUsingPort = 2
Const cdoPostUsingMethod =
"http://schemas.microsoft.com/cdo/configuration/postusing"
Const cdoNNTPServer =
"http://schemas.microsoft.com/cdo/configuration/nntpserver"
Const cdoNNTPServerPort =
"http://schemas.microsoft.com/cdo/configuration/nntpserverport"
Const cdoNNTPConnectionTimeout =
"http://schemas.microsoft.com/cdo/configuration/nntpconnectiontimeout"
Const cdoNNTPAuthenticate =
"http://schemas.microsoft.com/cdo/configuration/nntpauthenticate"
Const cdoPostEmailAddress =
"http://schemas.microsoft.com/cdo/configuration/postemailaddress"

Private Sub Post_News_Message()
Dim Cfg, Fields, Msg
Set Cfg = Server.CreateObject("CDO.Configuration")
Set Fields = Cfg.Fields
Set Msg = Server.CreateObject("CDO.Message")

With Fields
.Item(cdoPostUsingMethod) = cdoPostUsingPort
.Item(cdoNNTPServer) = "msnews.microsoft.com"
.Item(cdoNNTPServerPort) = 119
.Item(cdoNNTPConnectionTimeout) = 10
.Update
End With

With Msg
.Configuration = Cfg
.Newsgroups = "microsoft.test"
.From = "nobody@nowhere"
.Subject = "NNTP Test"
.TextBody = "NNTP Test Sent @ " & Now()
.Post
End With

Set Fields = Nothing
Set Msg = Nothing
Set Cfg = Nothing

End Sub
Post_News_Message
%>

I posted another message after this, after I modified my .From and it went
to the same thread. Do you know if this is based on the subject?


Hints:

1) Don't declare all variables over and over... Save yourself the headache
of copying them...
add a metatag to global.asa

(at first line in global.asa)
<!--METADATA TYPE="TypeLib" NAME="Microsoft CDO for Windows 2000 Library"
UUID="{CD000000-8B95-11D1-82DB-00C04FB1625D}" VERSION="1.0"-->
2) Use CreateObject instead of Server.CreateObject (which is a legacy method
and slower)


I was wrong to suggest that CDOSYS also reads NNTP servers, it only writes
to
them and it can format your message nicely and easily.
Basically, this would mean that you need an alternative to directories and
messages data from NTTP. As soon as you have a message, you load the message
using ADODB.Stream and load them with a message object. CDO will
automatically categorize and interprete the message from the stream.
 
R

Roland Hall

in message

: Hints:
:
: 1) Don't declare all variables over and over... Save yourself the headache
: of copying them...
: add a metatag to global.asa
:
: (at first line in global.asa)
: <!--METADATA TYPE="TypeLib" NAME="Microsoft CDO for Windows 2000 Library"
: UUID="{CD000000-8B95-11D1-82DB-00C04FB1625D}" VERSION="1.0"-->
: 2) Use CreateObject instead of Server.CreateObject (which is a legacy
method
: and slower)
:
: I was wrong to suggest that CDOSYS also reads NNTP servers, it only writes
: to
: them and it can format your message nicely and easily.
: Basically, this would mean that you need an alternative to directories and
: messages data from NTTP.

An alternative?


I've several things to read news messages and have run into a flurry of
problems:
1. My host says they support AspNNTP but the component is not loaded.
2. I tried using an NNTP reader written in .NET C#. It returns with errors.
3. I found there was a DYNU TCPSocket compnent loaded, so I tried using that
since I can telnet to the news server and issue the commands I want:
telnet msnews.microsoft.com 119
listgroup microsoft.public.inetserver.asp.general
head 272506
body 272506
....

The component connects but then says the trial period has ended.

I'm not having much luck. I've searched for hours on the net to find
something I could use without a component and have not been successful in
finding anything that actually works.

: As soon as you have a message,

Using this unknown alternative method I assume...

: you load the message

From where? ...a file?

: using ADODB.Stream and load them with a message object. CDO will
: automatically categorize and interprete the message from the stream.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
L

lancer

I've several things to read news messages and have run into a flurry
of
problems:
1. My host says they support AspNNTP but the component is not
loaded.

Check to see if your host has IP*Works! (they probably do) - it
contains an NNTP object.


Regards,
Lance R.
/n
software
http://www.nsoftware.com/

-
 
R

Roland Hall

: > I've several things to read news messages and have run into a flurry
: > of
: >
: problems:
: > 1. My host says they support AspNNTP but the component is not
: loaded.
:
: Check to see if your host has IP*Works! (they probably do) - it
: contains an NNTP object.

Thanks Lance. Unfortunately it's not loaded but I'm working on getting them
to install AspNNTP. Sometimes the first time I talk to support I get
someone that I cannot understand at all.

I told them since this was on the list of components they advertise as
having on the server, I would like to have it installed so I could use it.
It says the trial period has expired.

Their response was, it's there and it's a free component so it expires after
30 days. Let us know if you need to use it and we'll install it.

WTFO? (O:= Obviously there will be follow up correspondence.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
E

Egbert Nierop \(MVP for IIS\)

Roland Hall said:
: > I've several things to read news messages and have run into a flurry
: > of

Their response was, it's there and it's a free component so it expires after
30 days. Let us know if you need to use it and we'll install it.

WTFO? (O:= Obviously there will be follow up correspondence.

They'll have a problem if you share your server with more clients, another
client uses the same COM component while you paid for it :)
 
M

Michael D. Kersey

Roland Hall wrote:
An alternative?

I've several things to read news messages and have run into a flurry of
problems:
1. My host says they support AspNNTP but the component is not loaded.
2. I tried using an NNTP reader written in .NET C#. It returns with errors.
3. I found there was a DYNU TCPSocket compnent loaded, so I tried using that
since I can telnet to the news server and issue the commands I want:
telnet msnews.microsoft.com 119
listgroup microsoft.public.inetserver.asp.general
head 272506
body 272506
...

The component connects but then says the trial period has ended.

I'm not having much luck. I've searched for hours on the net to find
something I could use without a component and have not been successful in
finding anything that actually works.

Here's some free, debugged source code:
http://www.stonehenge.com/merlyn/WebTechniques/col62.html

To use it, you must install Perl on your IIS server. Visit
http://www.activestate.com/ for news.
Download "ActivePerl", a version of Perl for Windows at:
http://activestate.com/Products/ActivePerl/

Once you do that, you've got access to far more capability than ASP
alone can give you. See the astonishing variety of freely-available
Perl modules at http://search.cpan.org/
 
R

Roland Hall

in message
: Roland Hall wrote:
: <snipped>
: > An alternative?
: >
: > I've several things to read news messages and have run into a flurry of
: > problems:
: > 1. My host says they support AspNNTP but the component is not loaded.
: > 2. I tried using an NNTP reader written in .NET C#. It returns with
errors.
: > 3. I found there was a DYNU TCPSocket compnent loaded, so I tried using
that
: > since I can telnet to the news server and issue the commands I want:
: > telnet msnews.microsoft.com 119
: > listgroup microsoft.public.inetserver.asp.general
: > head 272506
: > body 272506
: > ...
: >
: > The component connects but then says the trial period has ended.
: >
: > I'm not having much luck. I've searched for hours on the net to find
: > something I could use without a component and have not been successful
in
: > finding anything that actually works.
:
: Here's some free, debugged source code:
: http://www.stonehenge.com/merlyn/WebTechniques/col62.html
:
: To use it, you must install Perl on your IIS server. Visit
: http://www.activestate.com/ for news.
: Download "ActivePerl", a version of Perl for Windows at:
: http://activestate.com/Products/ActivePerl/
:
: Once you do that, you've got access to far more capability than ASP
: alone can give you. See the astonishing variety of freely-available
: Perl modules at http://search.cpan.org/

Thanks for the links Michael. Perl is already installed.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
R

Roland Hall

in message
: "Roland Hall" wrote in message
: : >
: > : > : > I've several things to read news messages and have run into a flurry
: > : > of
: >
: > Their response was, it's there and it's a free component so it expires
: after
: > 30 days. Let us know if you need to use it and we'll install it.
: >
: > WTFO? (O:= Obviously there will be follow up correspondence.
:
: They'll have a problem if you share your server with more clients, another
: client uses the same COM component while you paid for it :)

Hi Egbert...

My point was I said, "I need this" and they already promote it is a
component they offer with my hosting service. However, the response from
support was, "Let us know if you need this and we'll install it" I don't
think they're asking me to pay for it. I think they just put on the trials
and wait until someone asks for the full version to be installed.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
EmeliaBryc

Latest Threads

Top