Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2006

Tip: Looking for answers? Try searching our database.

Converting a VB.Net Console Application to a Web Service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kls_kumar - 16 Mar 2005 22:31 GMT
Hi All,

 I wrote a sample application to extract the messages and attachments from
a .pst file using VB.Net which is working fine. Now i am trying to web
service enable this and when i added an operation in .asmx File

<WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _
   Public Function extractPST(ByVal fileName As String) As String
       Dim readPST As ReadPST
       readPST = New ReadPST
       readPST.readPST(fileName)
       Return "success"
   End Function

And i have  a class ReadPST.vb which has the code

Sub readPST(ByVal fileName As String)
       Dim i As Integer
       Dim objOutlook As New Outlook.Application
       ' Dim objNS As Outlook.NameSpace = objOutlook.Session
       Dim myNameSpace As Outlook.NameSpace = objOutlook.GetNamespace("MAPI")
       'Dim file As New System.IO.StreamWriter("c:\test.html")
       ' Add the .pst File to the Name Space
       myNameSpace.AddStore(fileName)
       ...........

 And when i tried to debug the code i am getting a 500 Error at the Line
Dim myNameSpace As Outlook.NameSpace = objOutlook.GetNamespace("MAPI")

 How can i resolve this..

Thanks a lot
Sateesh

 
Manohar Kamath - 16 Mar 2005 22:44 GMT
Error 500 is an "internal error" -- which could mean anything. Chances are,
the getNameSpaces method will not work with the ASP.NET's worker process
security. Have you tried running the web service in a user security context?

Signature

Manohar Kamath
Editor, .netWire
www.dotnetwire.com

> Hi All,
>
[quoted text clipped - 29 lines]
> Thanks a lot
> Sateesh
Henk Verhoeven - 16 Mar 2005 23:11 GMT
The chances are that the ASPNET (IIS5) OR NETWORK SERVICE (IIS6) user does
not have access to read or access the mail files.

You sure you have OUTLOOK installed.

Try also to capture the exception, the 500 error is what IIS returns, which
is an internal error, but use the try catch and then write the error message
back, that may give you more information

Henk

> Hi All,
>
[quoted text clipped - 30 lines]
> Thanks a lot
> Sateesh
masoom_mirage - 29 Mar 2006 06:27 GMT
Hi sateesh

My name is masoom and i hope that u got my last message.. I read ur
message and u mentioned that extracting from pst in VB.NET is working
fine with you.. I am masters student and currently making project for
Police Department in MElbourne. I would be grateful to you if u can
pass the code or can help me in any other way as the RFC for the pst
file is not available.

my emial address is  : masoom_mirage@yahoo.com
or mchauhan@students.latrobe.edu.au

Thanking you in anticipation

Masoom Chauhan

> *Hi All,
>
[quoted text clipped - 34 lines]
> Thanks a lot
> Sateesh *

--
masoom_mirage

masoom_mirage - 29 Mar 2006 06:29 GMT
> *Hi All,
>
[quoted text clipped - 34 lines]
> Thanks a lot
> Sateesh *

--
masoom_mirage


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.