|
Server Error in '/feedback' 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: CS0103: The name 'Email' does not exist in the current context
Source Error:
Line 23: try
Line 24: {
Line 25: MailAddress fromAddress = new MailAddress(Email.Text, Name.Text);
Line 26: smtpClient.Host = "localhost";
Line 27: smtpClient.Port = 25;
Source File: c:\Documents and Settings\Nick\Desktop\form\feedback\feedback.aspx.cs Line: 25
Show Detailed Compiler Output:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Web_vylzudcx.dll" /R:"C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Code.civsghgv.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /out:"C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Web_ibwg1szs.dll" /debug- /optimize+ /win32res:"C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\ibwg1szs.res" /w:4 /nowarn:1659;1699 "C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Web_ibwg1szs.0.cs" "C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Web_ibwg1szs.1.cs" "C:\Documents and Settings\Nick\Local Settings\Temp\Temporary ASP.NET Files\feedback\32aabdd3\593d0850\App_Web_ibwg1szs.2.cs"
Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.42
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
c:\Documents and Settings\Nick\Desktop\form\feedback\feedback.aspx.cs(25,55): error CS0103: The name 'Email' does not exist in the current context
c:\Documents and Settings\Nick\Desktop\form\feedback\feedback.aspx.cs(25,67): error CS0103: The name 'Name' does not exist in the current context
c:\Documents and Settings\Nick\Desktop\form\feedback\feedback.aspx.cs(33,47): error CS0103: The name 'remarks' does not exist in the current context
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727
|
|
|
|
|
nickabradley wrote: MailAddress fromAddress = new MailAddress(Email.Text, Name.Text);
The variables Email and Name do not exist. Neither does remarks, where-ever you use that.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I got the code to run (no errors and the page redirects after hitting submit) yet I do not get a email; any idea why?
--- feedback.aspx.cs ---
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
protected void OnSuccess()
{
SmtpClient smtpClient = new SmtpClient("mail.talligewi62.org");
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress(email.Text, name.Text);
smtpClient.Host = "localhost";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add("nickbradley@talligewi62.org");
message.Subject = "Talligewi 62 Website Feedback";
message.Bcc.Add(new MailAddress("banquet@talligewi62.org"));
message.IsBodyHtml = false;
message.Body = lodge.Text + " " + Remarks.Text + " " + Status.Text;
smtpClient.Send(message);
}
catch (Exception ex)
{
}
Response.Redirect("http://www.talligewi62.org");
captcha.Visible = false;
}
protected void OnFailure()
{
captcha.Message = "The text you entered was not correct. Please try again:";
}
}
--- End of File ---
Thanks for your help!
|
|
|
|
|
Set the breakpoint at the "Console.Write".
catch (Exception ex)<br />
{<br />
Console.Write(ex.Message);<br />
}
Show the ex.Message and ex.InnerException.Message .
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Here is what i have now; still no email. What am i doing wrong?
Still no error message and no email recived...
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}
protected void OnSuccess()
{
SmtpClient smtpClient = new SmtpClient("mail.talligewi62.org");
MailMessage message = new MailMessage();
try
{
MailAddress fromAddress = new MailAddress(email.Text, name.Text);
smtpClient.Host = "localhost";
smtpClient.Port = 25;
message.From = fromAddress;
message.To.Add("nickbradley@talligewi62.org");
message.Subject = "Talligewi 62 Website Feedback";
message.Bcc.Add(new MailAddress("banquet@talligewi62.org"));
message.IsBodyHtml = false;
message.Body = lodge.Text + " " + Remarks.Text + " " + Status.Text;
smtpClient.Send(message);
}
catch (Exception ex)
{
Console.Write(ex.Message);
}
Response.Redirect("http://www.talligewi62.org");
captcha.Visible = false;
}
protected void OnFailure()
{
captcha.Message = "The text you entered was not correct. Please try again:";
}
}
|
|
|
|
|
Hello,
How can I send mails to all users at a time? Means I dont want to write all users mail addresses like "( mail To = new mail (user@..net)" until the end.
And which ways can I send mails to different mail servers? Now I can send e-mails to users only with same mail server (host).
Please give me any ways I do need to follow.
Thanks!
-- modified at 11:19 Sunday 18th November, 2007
|
|
|
|
|
Create a mailing list (aka mailing group) and add all the email accounts to that list. Your mail server will then take care of the rest for you.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Hi,
I have a serious problem. I'm currently developing an application in which the user should upload many files (600-700 xml files). I've searched the web for a while and so far I realized that there's no way to use the HtmlInputFile class to achive the desired effect just because I can't set programatically the property of the class that stores the path of the selected file.
My first approach was to write some javascript code which would generate
tags but that seemed useless because firstly, in code-behind I can't access them and secondly, I can't set the path of the specified files. On the web I've found some articles which explain how to upload multiple files using the htmlinputfile class but in every case the number of htmlinputfile objects is static and the user should select manually the files he wants to upload. That's fine if you permit 3-5 files to be uploaded but when you want to handle a larger number of files, it is inconvenient.
In my case, the user should provide a folder on the drive and the application should handle the uploading of contents of that folder.
Any help is very, very appreciated!!!
|
|
|
|
|
You can add 1 upload control and generate many on the client script
then you'll access uploaded files using Page.Request.Files
check it at msdn[^]
Uploading an entire folder is not possible unless you provide an activex or something...
I think in your case you should request the user to zip the files and upload the zip file, then extract it on the server using SharpZipLib[^]
|
|
|
|
|
I just want to say that I have tried to use javascript and generate the tags, but the problem is that I wasn't able to access them on the server using the Request.Files property. And the other problem is that even if I can acces them it would be still a problem because I'm not able to assign the source path of the files programatically to the html controls (that property is read-only).
If you could recommend something useful I would be very thankful. I haven't used activex stuff before so I'm a bit stuck in the moment.
Finally, I would have anotehr question: would that be possible to zip the contents of the file programatically on the client side and post it to the server using the html file upload control.
Thanks in advance!!
|
|
|
|
|
Zoliq wrote: but the problem is that I wasn't able to access them on the server using the Request.Files property
I used this technique successfully before. Make sure that you have a least 1 server upload control in your aspx page, and generate other controls suing javascript.
Zoliq wrote: would that be possible to zip the contents of the file programatically on the client side and post it to the server using the html file upload control
Using only javascript, no. You don;t have access to the file system for security reasons.
|
|
|
|
|
Hi,
I want to create separate projects for Business Logic Layer(BLL) & Data Access Layer(DAL).I know how to do it in .NET 2003 giving references accordingly,but how to do it in .NET 2005.Can any body tell me stepwise?
Any kind of help will be appreciated.
Regards,
Montu
Hello There
|
|
|
|
|
Montu76 wrote: I know how to do it in .NET 2003 giving references accordingly,but how to do it in .NET 2005.Can any body tell me stepwise?
Exactly the same way.
Upcoming FREE developer events:
* Developer! Developer! Developer! 6
* Developer Day Scotland
My website
|
|
|
|
|
It works in the same way. Select the project file, go to the 'Project' menu and choose 'Add Reference'. This applies to both ASP.NET Web Sites and Web Application projects.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
How can i get list of users in sharepoint ?
|
|
|
|
|
I would like some direction in how to go about writing code to monitor network activity and traffic using ASP.Net. Where to start ..say if it's just to monitor traffic on my local network. ANY suggestions..or links or articles or even books that anyone can suggest to accomplish this, would be a real BIG help!
Real New at .Net and network stuff...
Thank you!
|
|
|
|
|
I don't understand why you wanna develop your own one while there are a lot of FREE web stats services are available on the net.. Have you tried to use "statscounter" or "reinvigorate.net"? those are really great web stats service..
However, if you wanna create your own, you may read this article below..
Track Your Site Statistics Using ASP.NET's Site Counters Service
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Thanks for your reply.
Actually I am looking to build a Network Security Analyser, with which I could do real time event monitoring and provide risk alerts ,traffic monitoring, monitor activity based on Protocols, or port activity ,do some basic reporting for the same and hopefully search log data for different devices for anomolies etc etc
I know there are some there are lots of third party tools like Netmon or the Network Security Analyser from eIQ or some others..and I'd like to build something similar..and really need some help on this since i don't have a clue where to start.
THANK YOU!
-- modified at 10:30 Monday 19th November, 2007
|
|
|
|
|
Hey.
How would I go about using master pages to give me a different structure on each page? For example I might have a header, 2 columns and a footer on my front page; But on my content page I want a header 1 column and no footer. How would this be achieved?
I know this has probably been asked a million and one times before (The search function wasn't working and just timing out when I used it ), so feel free to link me to another thread with this question answered.
Thanks
-Bursh.
Don't you just hate coming up with something to put here?
|
|
|
|
|
You'd do the one or two columns in the layout of your content area, not in your master page. If you needed to manipulate the master page from a content page, you'd use the Master property and cast it to the actual class you're working with, so you could in theory have a property to say how many columns you wanted, but it would be far nicer to avoid having your content pages know that much about the master page.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
So, correct me if I'm wrong, what your saying I should do is put the main body of the page (In this example\case - The number of columns I want) into the content page so the content place holder gets replaced by the contents of the content page (the number of columns)?
More visual explanation of what I think you're telling I should do:
Master Page
Header
:ContentPlaceHolder:
Footer
Content Page
Column 1 -- Column 2 -- Column 3
Content page then takes the place of :ContentPlaceHolder:?
Sorry if I'm on the wrong track. I'm fairly new to ASP.NET (and .NET in general). Though I am competent in PHP so the whole programming\coding\scripting\whatever you want to call it field isn't new to me.
-Bursh.
Don't you just hate coming up with something to put here?
|
|
|
|
|
Yes, that's precisely what I am suggesting
Bursh. wrote: I'm fairly new to ASP.NET (and .NET in general). Though I am competent in PHP so the whole programming\coding\scripting\whatever you want to call it field isn't new to me.
In that case, welcome I never learned PHP, I did some classic ASP and thoroughly hated it. I love ASP.NET tho.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for the warm welcome, and the advice too
Don't you just hate coming up with something to put here?
|
|
|
|
|
We have our current Web applications designed in ASP.We are planning to migrate this to .NET. Our applications interact with a lot of COM components hosted on MTS.We are planning to migrate all these applications along with the COM component to .NET,i.e., all ASP pages to ASPX and all COM components will be re written into .NET dlls. Okay so far so good.
As a part of our investigations, we are trying to come out with the best possible "replacement" for COM/MTS in .NET. We have thought of 3 techniques:
a.Put all the .net dlls(i.e., COM converted to .NET dlls) into a common folder and and refer them from our Web applications
b.Using .NET remoting: Hosting every .NET dll as a remotable object using a windows service.Our Web applications can consume this remotable object.
c.Using Reflection techniques: By Runtime binding them from Web applications
(Please Note: We do not want to look at Web Services as an option currently)
|
|
|
|
|
You can create costum control in DLL.
when shipping you can put these dll to Bin folder.
If you wan't to make avaible same dll to other project, then you must use GAC (Globaly Assembly Content - I hope i said it correctly). These option is more close to COM.
If you put in GAC, it has to be installed on hosting server. If you chose first, each project hosted there must have their dll.
And i don't know how tu use GAC
|
|
|
|