Showing posts with label old. Show all posts
Showing posts with label old. Show all posts

Monday, March 26, 2012

System.MissingFieldException: Field not found

http://groups.google.com/groups?hl=...%26filter %3D0

The above thread is old but has anyone come up with a solution to this
issue? The intermittent problem started after I added a UserControl that
contains a third party control.

The problem does not occur on my development workstation. But I have a
development site on the same server which hosts the production site. I
simply copy the executable from this site to the production site. Invariably
when I access the production site again for the first time, I get a compile
error. If I replace the dll again, the site works fine. But only for another
few days until I get the same exception.

Obviously the temporary fix is unacceptable.Further to my previous post, here's the problem described in another forum:

http://gotdotnet.com/community/mess...141&Page=1&so=1

It appears this behavior occurs when a third party control is embedded in a
UserControl on non-development machines.

Anyone have any ideas? The application going down every few days is really
unacceptable. Thanks in advance.
Field not found: SmartSub.MenuBar.webMenu.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.MissingFieldException: Field not found:
SmartSub.MenuBar.webMenu.

Source Error:

[No relevant source lines]

Source File: c:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempora ry ASP.NET
Files\smartsub\c3628410\4e846907\y7d4qwa4.0.cs Line: 0

Stack Trace:

[MissingFieldException: Field not found: SmartSub.MenuBar.webMenu.]
ASP.MenuBar_ascx.__BuildControlTree(Control __ctrl) +0
ASP.MenuBar_ascx.FrameworkInitialize() in
c:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempora ry ASP.NET
Files\smartsub\c3628410\4e846907\y7d4qwa4.0.cs:0
System.Web.UI.UserControl.InitializeAsUserControlI nternal() +31
System.Web.UI.UserControl.InitializeAsUserControl( Page page) +15
ASP.Default_aspx.__BuildControlmenuBar() in C:\SmartSub\default.aspx:15
ASP.Default_aspx.__BuildControlformDefault() in
C:\SmartSub\default.aspx:14
ASP.Default_aspx.__BuildControlTree(Control __ctrl) in
C:\SmartSub\default.aspx:1
ASP.Default_aspx.FrameworkInitialize() in
c:\WINNT\Microsoft.NET\Framework\v1.1.4322\Tempora ry ASP.NET
Files\smartsub\c3628410\4e846907\koa-hius.0.cs:0
System.Web.UI.Page.ProcessRequest() +84
System.Web.UI.Page.ProcessRequest(HttpContext context) +18

System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication+IExecutionSte
p.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +87

-----------------------
--
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET
Version:1.1.4322.573

System.net.Mail default smtp host

i was using the old system.web.mail classes.
and try to sent emails with net.mail, but i get an exception:
System.Net.Mail.SmtpFailedRecipientException was unhandled by user code
Message="Mailbox unavailable. The server response was: 5.7.1 Unable to relay for bla@dotnet.itags.org.bla.bla"

host property of SmtpClient must be set up! but what is default smpt host? is it "localhost"? i get an exception if i use it.Tongue Tied
thank u for ur advice

if i use this code it works for me (System.Web.Mail):

SmtpMail.SmtpServer =null;

SmtpMail.Send(mail);
because the name of the local SMTP server is used!!!!!!
WHAT NAME IS IT? how can i find it out?
i need the name to set the Host property of SmtpClient (System.Net.Mail).
thank u for ur advice


Hello.

I believe that you should use the classes SmtpClient and MailMessage to send your email message.


i still need ur help
Hello.
See if this helps:
http://www.developer.com/net/net/article.php/3511731

hi,

i m sorry but it has nothing to do with my question!


Hello.
not sure on what you0re after, but normally you use set that propertywith the name of the server. and you're the only one that know that...

Hi,
Did you find a solution to this problem...I am having the same problem. I use System.Mail.Net with the following code
SmtpClient client = new SmtpClient("localhost");
client.Send(message);
And get the following error
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@.
abc.abc
Many thanks for any help you can provide.

msplants wrote:

Hi,
Did you find a solution to this problem...I am having the same problem. I use System.Mail.Net with the following code
SmtpClient client = new SmtpClient("localhost");
client.Send(message);
And get the following error
Mailbox unavailable. The server response was: 5.7.1 Unable to relay for abc@.
abc.abc
Many thanks for any help you can provide.


As the error says:
The email server is not accepting mail from the server that the code resides in...
despite the fact that this site is based on 1.1's mail code, the server errors apply to any code trying to use a mail server
http://www.systemwebmail.net/faq/4.3.11.aspx

hey,

no, i still can not find the answer!

localhost is not a default smtp server.
HOW TO FIND THE NAME OFdefault smtp server?


stWooE wrote:

HOW TO FIND THE NAME OFdefault smtp server?


- Ask your IT department
or
- Goto the computer where the SMTP service lives, and use either (1) The name of the computer or (2) the IP address of the computer
And as noted in my last post, if there is any sort of permissions/security set on the SMTP service, you'll need to allow your web server to "relay" mail through it, all of it is at that website i linked to
- i talk all the time about my local smpt server
- for sure, i have tried the name of my comuter and ip, i get the same error!
i can only send emails with the deprecated classes from the version 1.1
but thank u anyway

this problem disppears if I change the Relay properties to "All except the list below", however this is not an acceptable configuration. Any help from here?
Thanks in advance


Hi, i know this post is rather old but i've searched the forums and found this thread hanging around and i have exactly the same problem as the original poster and i was wondering if perhaps some1 could give me some insight as to how to solve this this time around.

What do i type in host?

tx in advance,

Me


It's an even older post now, and I spent ages finding an answer to this problem, which still doesn't clearly appear her. So here goes:

If you are using the SMTP server that is installed with IIS, you need to allow relaying for 127.0.0.1 (localhost) in the SMTP Server properties. This can be found on the Access tab at the bottom - Relay Restrictions.

Under "Select which computer may relay through this virtual server", "Only the list below" should be checked. If not, check it, as this will prevent spammers hijacking your SMTP server. Then click "Add" and add 127.0.0.1 into the IP address.

In your script, you may well have something like this:

SmtpClient client = new SmtpClient();
client.Send(message);

You now need to add the bold line below:

SmtpClient client = new SmtpClient();
client.Host = "127.0.0.1";
client.Send(message);

Hope This Helps.

System.Net.Mail vs System.Web.Mail

I want to use the new System.Net.Mail instead of the old System.Web.Mail.
I'm getting an error "Hot not specified" when I try to do my last two lines:
System.Net.Mail.SmtpClient SMTP = new SmtpClient();
SMTP.Send(Message); //Error happens here
But the thing is, in my old use of System.Web.Mail, I never had this
problem. Why do I HAVE to specify the host in the new version and I didn't
have to in the old?
AlexHi,
In oldversion when using System.web.Mail, the SmtpMail class automatically
uses the built-in mail service in Windows 2000. But in new version,
SmtpClient class does not use any default mail service. Hence when using
System.Net.Mail namespace, you need to specify the host.
SmtpClient mailObj = new SmtpClient();
mailObj.Host = "name of the host";
(or)
SmtpClient mailObj = new SmtpClient( "name of the host");
MailMessage mail = new MailMessage("x@.yahoo.co.in", "x@.hotmail.com",
"Testing", "Hello Everybody");
mailObj.Send(mail);
Regards,
Sharmila
"Alex Maghen" <AlexMaghen@.newsgroup.nospam> wrote in message
news:93B69854-ECB5-4DB7-A461-56DD11855C9F@.microsoft.com...
>I want to use the new System.Net.Mail instead of the old System.Web.Mail.
> I'm getting an error "Hot not specified" when I try to do my last two
> lines:
> System.Net.Mail.SmtpClient SMTP = new SmtpClient();
> SMTP.Send(Message); //Error happens here
>
> But the thing is, in my old use of System.Web.Mail, I never had this
> problem. Why do I HAVE to specify the host in the new version and I didn't
> have to in the old?
> Alex
Thank you Sharmila for your input.
Hi Alex,
Thank you for your post.
Unlike System.Web.Mail, which was introduced in the 1.0 Framework,
System.Net.Mail is not built upon the CDO/CDOSYS libraries. Instead it is
written from the ground up without any interop. Thus, it is not dependant
upon on other COM libraries. Although some functionality has been removed,
the new System.Net.Mail namespace is much more versatile than the older CDO
dependant System.Web.Mail.
Other than Sharmila's input about specifying the server in code, you can
also config the Host, Credentials and Port properties for SmtpClient by
using the settings in the application or machine configuration files. For
example:
<configuration>
<system.net>
<mailSettings>
<smtp deliveryMethod="network">
<network
host="localhost"
port="25"
defaultCredentials="true"
/>
</smtp>
</mailSettings>
</system.net>
</configuration>
Hope this helps. Please feel free to post here if anything is unclear.
Regards,
Walter Wang
Microsoft Online Community Support
========================================
==========
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
==========
This posting is provided "AS IS" with no warranties, and confers no rights.

System.Net.Mail vs System.Web.Mail

I want to use the new System.Net.Mail instead of the old System.Web.Mail.

I'm getting an error "Hot not specified" when I try to do my last two lines:

System.Net.Mail.SmtpClient SMTP = new SmtpClient();
SMTP.Send(Message); //Error happens here

But the thing is, in my old use of System.Web.Mail, I never had this
problem. Why do I HAVE to specify the host in the new version and I didn't
have to in the old?

AlexHi,

In oldversion when using System.web.Mail, the SmtpMail class automatically
uses the built-in mail service in Windows 2000. But in new version,
SmtpClient class does not use any default mail service. Hence when using
System.Net.Mail namespace, you need to specify the host.

SmtpClient mailObj = new SmtpClient();
mailObj.Host = "name of the host";

(or)

SmtpClient mailObj = new SmtpClient( "name of the host");
MailMessage mail = new MailMessage("x@.yahoo.co.in", "x@.hotmail.com",
"Testing", "Hello Everybody");
mailObj.Send(mail);

Regards,
Sharmila

"Alex Maghen" <AlexMaghen@.newsgroup.nospam> wrote in message
news:93B69854-ECB5-4DB7-A461-56DD11855C9F@.microsoft.com...
>I want to use the new System.Net.Mail instead of the old System.Web.Mail.
> I'm getting an error "Hot not specified" when I try to do my last two
> lines:
> System.Net.Mail.SmtpClient SMTP = new SmtpClient();
> SMTP.Send(Message); //Error happens here
>
> But the thing is, in my old use of System.Web.Mail, I never had this
> problem. Why do I HAVE to specify the host in the new version and I didn't
> have to in the old?
> Alex
Thank you Sharmila for your input.

Hi Alex,

Thank you for your post.

Unlike System.Web.Mail, which was introduced in the 1.0 Framework,
System.Net.Mail is not built upon the CDO/CDOSYS libraries. Instead it is
written from the ground up without any interop. Thus, it is not dependant
upon on other COM libraries. Although some functionality has been removed,
the new System.Net.Mail namespace is much more versatile than the older CDO
dependant System.Web.Mail.

Other than Sharmila's input about specifying the server in code, you can
also config the Host, Credentials and Port properties for SmtpClient by
using the settings in the application or machine configuration files. For
example:

<configuration>
<system.net>
<mailSettings>
<smtp deliveryMethod="network">
<network
host="localhost"
port="25"
defaultCredentials="true"
/>
</smtp>
</mailSettings>
</system.net>
</configuration
Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.