[RESOLVED] [2005] Working with IIS and .aspx
Hello everyone,
Firstly i have absolutely no knowledge of working with asp.net .So i might sound a little n00bish.Anyway ,I have been struggling with sending mail without using outlook via ssl and finally found a COM library which can allow me to send mail over ssl/tls connections.Here's the link to the project.
The problem is the admin/author has posted a sample application (no other documentation on the usage of the library) in aspx .
This is what i have done to run it off my IIS server.
Place the files in a folder named dns in the wwwroot folder.The dll is inside a folder named bin within the folder dns.
Place the ssl libraries in the system32 folder as mentioned in the aspx file
Start the iis server.
Navigate to http://localhost/dns/dnsmail.aspx.
The server now returns me this error
Quote:
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'Erle' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 1: <%@ Page Language="C#" Debug="true" ValidateRequest="false" %>
Line 2: <%@ Import Namespace="Erle.DnsMail" %>
Line 3:
Line 4: <script runat="server">
Source File: e:\Inetpub\wwwroot\dns\dnsmail.aspx Line: 2
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
Can someone explain whats going wrong here.??Any help would be greatly appreciated. :)
I have attached the requisite files .
Re: [2005] Working with IIS and .aspx
You cannot expect COM objects like Dll files to work just by copying them. Yes, even in .Net, you have to add a reference to them, just like you do in VB6.
In your ASP.Net project, within the ProjectName-> Reference, right-click it, then click on "Add Reference...".
or "Add web reference.." if it's a web service object.
Browse to the Erle.DNSMail.dll file and click OK. Try running your project and post back.
And thank you for the link.
Re: [2005] Working with IIS and .aspx
Somehow i cant see any project menu when i open the aspx file the 2003 ide.I only installed c++,c# and vb and left out everything else .Should i install something extra for asp.net??
btw i just ported the code to c# and built it.It seems to be running fine .If you don't mind could you just check if its working on your system?
Re: [2005] Working with IIS and .aspx
Quote:
i just ported the code to c# and built it.It seems to be running fine
Are you able to send mail through your project?? I don't know, but whenever I try to make a project of sending mails, it fails most of the time, and it happened with your code also!! So I have stopped trying my luck now. Maybe I will try after some days.
Quote:
i cant see any project menu
It is my mistake, didn't specified in detail.
- Create a new project. C#, Web Application. (default will be WebApplicationx). This will also notify you if ASP.Net is properly installed or not!!
- Add the attached file to this newly created project. It will ask you to create the class file for the page. Click Yes.
- Also, place the attached Dll file somewhere. Good idea (right now) will be to put it in the bin folder of the project.
- Within the Project, Goto Solution Explorer, right-click on the project name (in our example WebApplicationx), goto Add Reference, click on Browse, goto to the Bin folder and select the Erle.DNS.Dll file. Click OK.
- Now Compile and run your project. Goto to that page and try sending mail.
To check if IIS and ASP.Net is properly installed:
for IIS: Run your browser, and in the url type
This will show you a default IIS page (page name should be localstart.asp). This means IIS is installed.
for ASP.Net: yes, .Net framework should be installed. :bigyello: Goto Start -> Run.
In the dialog box, type "inetmgr.exe". This will open the the IIS console. Select the "WebSites" node under (Local computer) and right-click, goto properties.
For .Net 1.1 and 2.0, under "ISAPI Filters", check the list of filters installed/configured. One must be "Asp.Net_2.0.50727" for .Net 2.0 (or something along this line), and for 1.1, "ASP.Net_1.1.4322" (or something along this line).
For 2.0 only, there must be another Tab in the properties of WebSites named ASP.Net. It will automatically tell you that ASP.Net is installed.
Hope it helps you.
PS: Sorry for errors if there are any. Quite a long post.
Re: [2005] Working with IIS and .aspx
Thanks for your efforts harsh,I was able to set it up properly.
It worked for gmail,yahoo .Though it dint work for hotmail..In case you are aware of any such libraries that will let send mail either over dns or smtp with ssl support ,do let me know!
BTW ,the tutorial was quite nice and elaborative.Maybe you could add it to the tutorials section.
ps:the need to check for asp.net was not required as i have installed every possible sdk that microsoft has ;)
Re: [2005] Working with IIS and .aspx
Heyy i found this site www.systemwebmail.com that you may find useful .it deals completely with smtp,pop etc.
Re: [2005] Working with IIS and .aspx
Yes, Hotmail do pose some problem when you send mails, and I am not quite aware why!!
Check this thread from MS forums. There are 3 pages in total and if I remember correctly, some one mentioned about the hotmail problem. You may require some kind of OutLook library.
I remember that site. Even posted the same link few days back.
Tried sending the mail to my gmail account using localhost, but :mad:
Re: [2005] Working with IIS and .aspx
Ohh well you should check your spam folder then.
When i sent a mail saying its from littlewiki[at]hotmail.co.uk ,It went straight to spam.
Then i sent it as littlewiki[at]gmail.com and it popped up in my inbox!.
Well for hotmail,I don't think its possible.
Re: [2005] Working with IIS and .aspx
It isn't because of the MS Passport it uses. I think there are various security issues regarding Passport and a licence to use it costs thousands. Sorry.
Re: [2005] Working with IIS and .aspx
Quote:
It isn't because of the MS Passport it uses. I think there are various security issues regarding Passport and a license to use it costs thousands. Sorry.
I didn't get that!!.Does that have anything to do with my post??.AFAIK hotmail has disabled pop and smtp access for the general public.
Re: [2005] Working with IIS and .aspx
Access to hotmail requires Passport authentication (Passport is a Microsoft technology). To use Passport you need to buy a licence which is a LOT of money.
Re: [2005] Working with IIS and .aspx
SO its advised not to use it at all. lol :D
Re: [2005] Working with IIS and .aspx
Well let's just say it's not really worth the hassle :)