Using OpenPop.dll in Sharepoint

I'm using POP3 in sharepoint to read and count mails in my mail but i received error : "Could not load file or assembly 'OpenPop, Version=2.0.4.369, Culture=neutral, PublicKeyToken=bebb5741791313cd' or one of its dependencies. The system cannot find
the file specified."
Here 's my code :
HTML code
<div id="form1" runat="server">
Mail Server Name:
<asp:TextBox ID="txtMailServer" runat="server" />
<br />
UserName:
<asp:TextBox ID="txtUserName" runat="server" />
<br />
Password:
<asp:TextBox ID="txtPassword" runat="server" TextMode = "Password" />
<br />
Port:
<asp:TextBox ID="txtPort" runat="server" Text = "" />
<br />
SSL:
<asp:CheckBox ID="chkSSL" runat="server" />
<br />
<asp:Button ID="btnReadEmails" runat="server" Text="Read Emails" OnClick = "Read_Emails" />
<br /><hr />
<asp:GridView ID="gvEmails" runat="server" AutoGenerateColumns = "false">
<Columns>
    <asp:BoundField HeaderText = "From" DataField = "From" />
    <asp:HyperLinkField HeaderText = "Subject" DataNavigateUrlFields = "MessageNumber" DataNavigateUrlFormatString = "~/ShowMessageCS.aspx?MessageNumber={0}" DataTextField = "Subject" />
    <asp:BoundField HeaderText = "Date" DataField = "DateSent" />
</Columns>
</asp:GridView>
</div>
Code .cs
protected void Read_Emails(object sender, EventArgs e)
            try 
                Pop3Client pop3Client;
                if (Session["Pop3Client"] == null)
                    pop3Client = new Pop3Client();
                    pop3Client.Connect(txtMailServer.Text, int.Parse(txtPort.Text), chkSSL.Checked);
                    pop3Client.Authenticate(txtUserName.Text, txtPassword.Text);
                    Session["Pop3Client"] = pop3Client;
                else
                    pop3Client = (Pop3Client)Session["Pop3Client"];
                int count = pop3Client.GetMessageCount();
                DataTable dtMessages = new DataTable();
                dtMessages.Columns.Add("MessageNumber");
                dtMessages.Columns.Add("From");
                dtMessages.Columns.Add("Subject");
                dtMessages.Columns.Add("DateSent");
                int counter = 0;
                for (int i = count; i >= 1; i--)
                    Message message = pop3Client.GetMessage(i);
                    dtMessages.Rows.Add();
                    dtMessages.Rows[dtMessages.Rows.Count - 1]["MessageNumber"] = i;
                    dtMessages.Rows[dtMessages.Rows.Count - 1]["Subject"] = message.Headers.Subject;
                    dtMessages.Rows[dtMessages.Rows.Count - 1]["DateSent"] = message.Headers.DateSent;
                    counter++;
                    if (counter > 5)
                        break;
                gvEmails.DataSource = dtMessages;
                gvEmails.DataBind();
            catch { }

Hi,
This should help you
http://stackoverflow.com/questions/9999441/c-could-not-load-file-or-assembly-openpop-version-2-0-4-369-culture-neutral.
Verify that the assembly is signed, if you created your own assembly, sign it.
2) Install the DLL to the GAC using gacutil from SDK tools of Visual Studio (http://msdn.microsoft.com/en-us/library/dkkx7f79.aspx)
3) Reference the same DLL from your Script Task
Please remember to click 'Mark as Answer' on the answer if it helps you

Similar Messages

  • Convert word document in PDF,e pub,by using third party dll in Sharepoint designer workflow 2013?

    Hi,
    I want to convert word document to PDF,  EPub, by using third party (.dll).
    In SharePoint designer workflow in 2013.
    So that I have question, Can we Install third party (.dll) in SharePoint workflow Designer for conversion?
    Means I have created one simple application conversion of word to e Pub, PDF, Image by using (Spire.doc dll) in Visual Studio.
    So this same conversion I want to work in SharePoint designer workflows?
    So anybody has any solution then please provide me.
    Thanks,
    Samadhan

    it might be worth looking at these CodePlex steps, that plug directly into the Word Automation Services.
    http://sp2010wordautomation.codeplex.com/
    It'll provide you with a configurable step like the below that should help you achieve your aims
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Find microsoft.sharepoint.administration.dll in SharePoint 2013

    Hi All,
    Can anyone tell me how do i get microsoft.sharepoint.administration.dll in SharePoint 2013?
    I have installed "MicrosoftSharepointAdministrationToolkit.exe" toolkit. Still, I am not getting above mentioned DLL.
    http://www.microsoft.com/en-in/download/details.aspx?id=14227
    Thanks in advance!!

    The link you have used points to the SharePoint 2007 administration toolkit. You can find the Microsoft.SharePoint.Administration namespace classes in Microsoft.SharePoint.dll.
    Blog |SharePoint Field Notes Dev Tool |
    SPFastDeploy

  • Get "Creation Script" of the existing table ( in SQL database) using C# and without using SMO dlls

    Hi All,
    I need to get the "Creation Script" of the existing table using c# and without using SMO dlls (is it possible? I don't know).
    I.e. In SQL Management Studio -> right click on any table -> Script table as -> Create To  - > open in the new query editor window. This will give you the schema of the table with the constraints of the table.
    For E.g. In Northwind database, for the table "Categories", I would like to get it as show below
    USE [Northwind]
    GO
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[Categories](
        [CategoryID] [int] IDENTITY(1,1) NOT NULL,
        [CategoryName] [nvarchar](15) NOT NULL,
        [Description] [ntext] NULL,
        [Picture] [image] NULL,
     CONSTRAINT [PK_Categories] PRIMARY KEY CLUSTERED
        [CategoryID] ASC
    )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO
    I would like to get the same schema using c#. Please help.
    Thanks & Regards,
    Kalai.

    SMO is the easiest way to get this. This is what Management Studio uses. If you can't use SMO, get a Profiler trace of the queries that SMO executes when generating the script and execute the same using ADO.NET.
    Regards,
    Farooq Mahmud
    Support Escalation Engineer 
    •  Microsoft Health Solutions Group

  • Ldapssl_client_init always returns -1 when using nsldapssl32v50.dll

    We have an iPlanet Directory Server v5.2 installed and SSL has been configured on it.
    When we call ldapssl_client_init(CERTDBPath, NULL) we always get a the return value as -1.
    We used nsldapssl32v30.dll and the corresponding lib and tried the same program and it worked perfectly fine.
    Now the question is why does this call fail when using the 5.0 version of the library.
    We have tried calls to ldapssl_client_init in the different ways like
    --> ldapssl_client_init("D:/Program Files/Sun/MPS/alias", NULL)
    with the cert7.db in this path. This failed
    --> ldapssl_client_init("D:/Program Files/Sun/MPS/alias/slapd-mydb-cert7.db", NULL)
    This also failed
    We need to use the v5 of the library bcoz the older versions are not compliant with LDAP v3 for referral support.
    Our current environment is Win2k Server SP4 and iPlanet Dir Server 5.2.
    Please help us sort out this issue.
    Thanks
    Raghu

    The function "ldapssl_client_init" returns -1, if I use LDAP SDK 6.0 binaries (source downloaded from http://wiki.mozilla.org/LDAP_C_SDK and compiled). It returns same error code i.e. -1, if we use precompiled binaries.
    But if I use the old LDAP 5.2 binaries, it works fine.
    Here is a sample code that I used to test ldapssl_client_init() on RHAS3.0:
    #include <ldap.h>
    #include <ldap_ssl.h>
    #include <stdio.h>
    /* Initialize client, using mozilla's certificate database */
    int main(void) {
    /* "/home/infwaer/test/" is the folder that contains cert7.db and key3.db*/
    if(ldapssl_client_init( "/home/infwaer/test/", NULL ) < 0) {
    printf( "Failed to initialize SSL client...\n" );
    return( 1 );
    else
    printf( "Initialized SSL client...\n" );
    I used the following command to compile it with 5.2 binaries, and was able to successfully call the function ldapssl_client_init:
    gcc ldapclient.c -I/home/infwaer/nsldap/5.2/RHAS3.0/include
    -L/home/infwaer/saurabh_review/lib -lldap50 -lnspr4 -lplds4 -lplc4 -lsoftokn3 -lnss3 -lssl3 -lprldap50 -lssldap50 -ldigestmd5 -lsasl
    But when I compiled it using 6.0 binaries using the same command:
    gcc ldapclient.c -I/home/infwaer/nsldap/6.0/RHAS3.0/include
    -L/home/infwaer/saurabh_review/lib -lldap60 -lnspr4 -lplds4 -lplc4 -lsoftokn3 -lnss3 -lssl3 -lprldap60 -lssldap60 -ldigestmd5 -lsasl
    It gave the error "failed to initialize" (as written in the code !)
    Please help me out; n let me know if it is a known issue with LDAP SDK 6.0. Or we need to do some special settings for version 6.0 to work properly.
    Thanks & Regards,
    Saurabh

  • Where can I get the latest Microsoft.SharePoint.ApplicationPages.dll for SharePoint 2010?

    Can somebody point me to where I can get the latest Microsoft.SharePoint.ApplicationPages.dll for SharePoint 2010?
    When I go into Library Settings on any library or list in SharePoint 2010 I’m getting an unexpected error; I see this in the SharePoint log:
    11/18/2014 13:12:26.36 w3wp.exe (0x2260)                       0x33EC  SharePoint Foundation        
            Runtime                                      
    tkau       Unexpected       System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.SharePoint.ApplicationPages.ListEditPage.SetSectionLinks()    
    at Microsoft.SharePoint.ApplicationPages.ListEditPage.OnLoad(EventArgs e)     at ASP._layouts_listedit_aspx.OnLoad(EventArgs e)     at System.Web.UI.Control.LoadRecursive()     at System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 03c7c5b4-407f-461c-9cf7-0304eb797b1a
    I searched online and found this:
    https://social.technet.microsoft.com/Forums/sharepoint/en-US/ed5aa58a-f5cc-4449-8bfd-65ca6f101641/list-settings-page-error-on-all-type-of-sharepoint-2010-listslibraries?forum=sharepointgeneralprevious.  It says:
    We noticed exactly the same issue after applying some SharePoint updates (SP1 + October 2011 CU).  The problem turned out to be that there was an older version (V14.0.4762.1000) of Microsoft.SharePoint.ApplicationPages.dll in the GAC. 
    This version was being loaded instead of the latest version of the DLL (14.0.6112.5000).
    Loading the latest version of Microsoft.SharePoint.ApplicationPages.dll fixed the problem with the List/Library settings page.
    I check our Microsoft.SharePoint.ApplicationPages.dll and found that we have version 14.0.6024.1000.
    I would like to try replacing it with the latest version to see if that could fix the problem going into library settings.
    Does someone know where I can get the latest Microsoft.SharePoint.ApplicationPages.dll for SharePoint 2010?
    David

    You would need to extract it from an update. Pre-SP2 SharePoint 2010 is no longer supported, I'd recommend upgrading to SP2 which should take care of any versioning issues.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Problem in using AcroPDF.dll in vb6 application

    I have an vb6 application and i want to display a PDF file in a form. I have used AcroPDF.dll and works fine on developmeny system.
    But when i install application on client's system i get error "Out of memory" when i try to open the form with PDF control.
    can anyone help me with this.
    Thanks

    Try asking this question in the Acrobat SDK forum.

  • How can I use a dll if I dont have a header file

    I'm not sure if I'm even trying the possible here as I have searched and not been able to find much at all.  However I figured it was worth asking here.
    I have access to several dll's used by a program, I need to open a file using the program (for some reason it is completely non responsive unless you open it "within" the program itself) and so decided to browse the .dll files included.  Ive found a few functions which may carry out the function I need.  Is there a way of figuring out the inputs/outputs if I don't have documentation or a header file?
    This is the next stage in a huge project I am working on at the moment and I've been banging my head against the wall all day trying to figure this out.
    Thanks in advance for any help
    Rik
    That glass?
    Thats glass is neither half full or half empty....
    Its twice the size it needs to be

    Yes, that makes sense. It also means that what you are trying to do is not likely to work. You have no way of knowing what the program does when opening the file, so guessing at using the DLLs is purely a shot in the dark without even knowing where the dark is. Even if you could find the function (assuming it's just one) that loads a file, how is the program supposed to use it now? That function has to be called from within the program. When you call it from LabVIEW you are not sitting inside the program's memory space, so it has no way of knowing about the file.
    I would suggest, instead, to see if the program accepts command-line parameters. For example, does it accept a name of a file to open as part of launching it from the command line? If not, then you may need to resort to trying to control it via automation. If it has no built-in automation then you need to resort to using the OS to make pretend you're clicking buttons and typing text. This has come up many times before, and there have been numerous posts on this, so please do a search on controlling an external program from LabVIEW within this forum. You can call the Windows API functions to move the mouse to a specific location and click the button as well as typing text, or you can use third-part automation tools. One that I have used successfully is AutoIt. The search I indicated will yield other suggestions. 

  • Error while creating folder named "bin" using explorer view in sharepoint 2010

    I am getting error when I create a folder in a library named "bin" using explorer view in sharepoint 2010.
    When I create folders with other names I don't get any errors.
     Please suggest.

    Hi,
    According to your description, my understanding is that you got an
    error when you create a folder named “bin” in a SharePoint library with explorer view.
    There are any Microsoft.NET Framework assemblies that have controls or parts that the SharePoint site uses, which are stored in the bin folder. You can remove “bin”  from hidden segments, then you can create a folder named “bin”
    in the SharePoint library with explorer view.
       1.Opened IIS Manager and selected Server name -> Request Filtering -> Hidden Segments tab -> Removed "bin" from there:
       2.Perform IISRESET:
    Thanks,
    Dean Wang

  • Using a .dll file in Diadem2012

    Dear folks,
    I've got a .dll which was created using the Diadem GPI toolkit 10.2 and Microsoft Visual Studio 8.0, I guess. I'm currently using this DLL under Diadem 9.0.
    Now I'd like to use this same DLL under Diadem 2012, but it won't work. When loading this DLL via the GPI-DLL loader, It only says .dll couln't be loaded, no further output, no more debug information...?
    What can I do to load this DLL into Diadem2012, or do I have to code the whole DLL new?!
    Thanks for your help in advance.
    Tim

    Hi Walter,
    thanks for your fast reply.
    I tried to recompile that file in Visual Studio 10, because I had an old project file coded in Visual Studio 8. Unfortunately, that did'nt work. The .dll could not be built. So I'd like to try to install the runtime library.
    I don't know under which visual studio version, the dll file was built, so what should I do? Install Visual Studio 8 and 6 and hope that the runtime library I need is installed then?
    Thanks for your help.
    Greets Tim

  • How to use the DLLs which created from c++ in Java?

    And How to use the DLLs which created from JNI in C++?

    Huh?
    Are you asking how to do JNI - you should read the tutorial.
    Are you asking how to load it - then use System.loadLibrary()
    Are you asking what to do with the output from javah - put it in a C file and write some code, compile it into a dll.

  • How to use the DLL in crystal report (Additional applications)

    Hi,
    i have created a win32 dll, and now i want to use that dll in my crystal report how can i do so?, what i tried is i went to to Addntional functions catagory in formula workshop, and there i can see some dlls listed, similary i put my dll in the same path like "C:\Program Files\Common Files\Crystal Decisions\1.0\Bin" and other folder too. but i am not able to see that dll in "Addtional functions". can you plesase tell how can i achive this.
    Regards,
    Prabhakar J.

    Please re-post if this is still an issue to the .NET Development - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly

  • How to use AcroPDF.dll even if addon is deactivated in InternetExplorer

    Hello,
    hopefully someone can help me with my problem:
    I need to instantiate AcroPDF.dll and have it deactivated at the same time in InternetExplorers Addon-settings.
    But when I deactive the addon in IE, CreateObject("AcroPDF.PDF.1") throws an error that the instance could not be created, but the dll is still registered.
    How does this deactivation work technically? Is there any way to use the dll in other applications regardless of the IE-settings?
    Best regards and thanks in advance,
      Thomas

    For programming issues you should use the forum for Acrobat SDK.

  • How to use CRAXDDRT.DLL in crystal report 2008?

    Hello All,
    We have purchased Crystal report 2008 Full software.
    We need to insert BLOB field into Crystal report 2008 at runtime using *CRAXDDRT.DLL*.
    How can I insert OLE object and bind it at Runtime using crystal report 2008?
    Is it possible to insert Ole Object runtime using crystal report 2008? If yes how and if not is there alternative to perform this job.
    Please let me know your feedback.
    Thanks

    CrxDDrt.dll is only provided in order for the Crystal Reports designer in the .NET IDE.
    1) You are not licensed to use this CraxDDrt.dll
    2) Even if you were, in previous versions of CR, there were licensing implications to using the craxDDrt.dll (read $$)
    3) Once your project would be done, using CR 2008, you would not be able to distribute the runtime as there is no CR MSM or MSI that contains the craxDDrt.dll and it's supporting runtime.
    In your original post you say:
    "I need to show Word and Pdf file in to Crystal report 2008 using CRAXDDRT.DLL";
    I do not understand why you'd need to do this using the craxddrt.dll? You should be able to insert a BLOB field using the RAS SDK for .NET and CR 2008. Now, one hting you will have to keep in mind. If you insert a multipage .doc or .pdf file into the report, you will only get the first page of that document. I suggest you try this in the CR designer first. Always remember that if you can not do a certain thing in the designer, you will not be able to do it at runtime either. Giving all the limitations above, if you are still interested in doing this using RAS, let me know and I'll set you up with some resources to get you going.
    Ludek

  • Build a DLL in LabVIEW & Use the DLL in LabVIEW

    I am trying to build a DLL for the simple vi with LabVIEW and want to use the DLL in LabVIEW. is it impossible?
    I wrote a vi and it have 2 terminals. one is the input for numeric dbl data type and one another is the output for numeric dbl 1D array data type.
    It was built with the Application builder for LabVIEW 8.0 and DLL was created successfully.
    I want to use this DLL in new vi with LabVIEW.
    Call library function used. I wrote a new vi to use that DLL.
    In config dialog I config each parameter for dll and connected terminals. but it doesn't work
    pleas refer to the attatched file and let me know what I missed.
    Attachments:
    Array1D.zip ‏60 KB

    At first I kept scratching my head wondering why someone would want to do this. Create a DLL in LabVIEW to call it from LabVIEW. Seems redundant. But, perhaps it's an exercise or perhaps it's for testing the DLL...
    In any event, calling the DLL worked for me in 8.2. How are you configuring your Call LIbrary Function node? I have it set up as follows:
    return type: void
    iteration: Numeric, Signed 32-bit Integer, pass by value
    array1D2: array type, Signed 32-bit Integer, 1 dimension, "Array Data Pointer" format
    len: Numeric, Signed 32-bit Integer, pass by value
    Then I called the DLL like this:
    Message Edited by smercurio_fc on 03-16-2007 12:57 PM
    Attachments:
    Example_BD.png ‏2 KB

Maybe you are looking for

  • Is it possible to have iMovie HD and iMovie HD 6 installed on the same Mac

    While I like some of the video editing features of iMovie HD 6, the problems with the Ken Burns Effect have killed my ability to create slideshows with iMovie. This worked just fine in iMovie HD (version 5.x). Is it possible to have both applications

  • Finder Window Flashes When Showing Preview Of Multimedia Files.

    When Show Icon Preview is selected the finder window flashes(i.e, its gets highlighted and deactivated in a flashing manner) especially when previewing files of movies and pictures(PDF previewing is fine).The problem is there even in cover flow mode

  • Custo Idoc

    Hi All, Can any body explain me how to create and transfer custom Idoc(Purchase order type) for Sap Business connector server. thanks&regds, srinivas.

  • Problem with serialized objects and JWS

    My JWS launched application fails when loading a serialized object that has been instatiated from a class not contained in the signed jar-file. Does anyone know why this happens and if there is some workaround for the problem?

  • Installing Boot Camp after Parallels

    I have installed Parallels 4.0 but I need to install Boot Camp (to be able to watch iPlayer via my XBox). Is it safe to just install Boot Camp using my Windows XP disc (I have plenty of hard disc space) or do I have to uninstall Parallels and reinsta