473,669 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

URGENT * PLEASE - problem when sending mail - C# - Framework 1.1

Hey all,

I have a URGENT problem and I hope someone could help me...

scenery:
I have a windows app, coded using C# (framework 1.1 - VS2003)... The

exe and dlls of the app is are stored in a server, and the clients

access this app through a shortcut that points to this. The folder of

the app is shared on the network. This app accesses a oracle database.
I'm using system.web.mail namespace..

The users/clients can access the app with no problem, everything ok.

But when I try to send mails, I get an exception...

When I'm debuging the app and running it local, the e-mail is sent,

but when I copy it to the server and access the app through the

network, i get the error...

So here are my question:

- What's the name given to this programming model (user/client

accessing exes on a server)?
- What are the requirements to accomplish this task according to this

programming model?
- Do the client pcs need something special to send the mail?

Thanks for your help and sorry for poor english.
Jul 22 '08 #1
2 1793
The exception should give you some clues as to what the problem is. You
don't say if you're accessing the app on a mapped drive or a UNC share, but
I suspect it's a security issue where either the runtime is not letting you
access network resources because you launched it remotely, or your
application is trying to load an associated dll from the server folder and
being denied access.

I suggest either
a) mapping a drive to access the executable over, rather than a UNC network
path, or if that doesn't work
b) redeploy your application on your webserver directly and migrate the app
to call a web service on the originating server to send the mail

Leon

"Férnas" <ga*****@widewe b.com.brwrote in message
news:c2******** *************** ***********@d77 g2000hsb.google groups.com...
Hey all,

I have a URGENT problem and I hope someone could help me...

scenery:
I have a windows app, coded using C# (framework 1.1 - VS2003)... The

exe and dlls of the app is are stored in a server, and the clients

access this app through a shortcut that points to this. The folder of

the app is shared on the network. This app accesses a oracle database.
I'm using system.web.mail namespace..

The users/clients can access the app with no problem, everything ok.

But when I try to send mails, I get an exception...

When I'm debuging the app and running it local, the e-mail is sent,

but when I copy it to the server and access the app through the

network, i get the error...

So here are my question:

- What's the name given to this programming model (user/client

accessing exes on a server)?
- What are the requirements to accomplish this task according to this

programming model?
- Do the client pcs need something special to send the mail?

Thanks for your help and sorry for poor english.
Jul 22 '08 #2
It does really look like a Code Access Security problem, since the
application runs correctly from the local PC but fails when run from the
server, which by default would give it greatly reduced permissions.

The text of the exception should give you more detailed information about
exactly which permission you are missing. As a test, I would suggest that
you go to the Administrative Tools in Control Panel and use the .NET
Framework Configuration tool to assign Full Trust to your assemblies (the
..exe and dll's of your program). If the program runs correctly under Full
Trust (it should) you can then trim down the permissions until you grant the
minimum needed.

Once you have established a correct security configuration, you can then use
the same .NET Framework Configuration tool to generate a .msi that will set
those permissions when run in any other computer. You will have to
distribute and execute the .msi on all the computers in your network that
require access to the application that you are sharing in your server. You
can, for instance, set a policy that says "grant Full Trust to all
assemblies loaded from Server X", or "grant Full Trust to all assemblies
signed with this Key" (and sign with that key your deployed assemblies).

"Férnas" <ga*****@widewe b.com.brwrote in message
news:c2******** *************** ***********@d77 g2000hsb.google groups.com...
Hey all,

I have a URGENT problem and I hope someone could help me...

scenery:
I have a windows app, coded using C# (framework 1.1 - VS2003)... The

exe and dlls of the app is are stored in a server, and the clients

access this app through a shortcut that points to this. The folder of

the app is shared on the network. This app accesses a oracle database.
I'm using system.web.mail namespace..

The users/clients can access the app with no problem, everything ok.

But when I try to send mails, I get an exception...

When I'm debuging the app and running it local, the e-mail is sent,

but when I copy it to the server and access the app through the

network, i get the error...

So here are my question:

- What's the name given to this programming model (user/client

accessing exes on a server)?
- What are the requirements to accomplish this task according to this

programming model?
- Do the client pcs need something special to send the mail?

Thanks for your help and sorry for poor english.

Jul 22 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2404
by: Franco, Gustavo | last post by:
Hi, I have a question, and please I need a answer. How can I finalize a thread running with Application.Run (I need the message loop!!!) without call Thread.Abort?. I want to call Application.ExitThread in the same thread that it is running.
1
2242
by: Chirag Malvi | last post by:
hello all, I am developing the web application using ASP.net and VS.2003 IDE. here is the situation which i want to implement. 1) User is browsing some webform. I want to trap this event. this i am doing with Session_Onstart. 2) Now when user is exiting i.e. closing the browser window i want to trap this event and perform some operation. I tried using Session_OnEnd event,but
5
3022
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I need to send data from my server via the post method to the payment server. The payment server does not run asp.net. I dont know what they run. The payment server then returns to my server with the
16
2928
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In: http://www.mywebsite.org/WebResource.axd?d=5WvLfhnJp5Lc8WhQSD4gdA2&t=632614619884218750 -------------------------------------------------------------------------------- System.Security.Cryptography.CryptographicException: Padding is invalid and cannot be removed. at...
6
2458
by: varkey.mathew | last post by:
Dear all, Bear with me, a poor newbie(atleast in AD).. I have to authenticate a user ID and password for a user as a valid Active Directory user or not. I have created the IsAuthenticated function exactly as outlined in the below link. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT02.asp
3
57633
by: HoustonComputerGuy | last post by:
I am working on getting my web applications moved to .Net 2.0 and am having some problems with System.Net.Mail. I get the following error when sending the mail: System.Net.Mail.SmtpException was unhandled by user code Message="Failure sending mail." Source="System" StackTrace: at System.Net.Mail.SmtpClient.Send(MailMessage message) at System.Net.Mail.SmtpClient.Send(String from, String
1
2362
by: Liam.M | last post by:
HEY GUYS, need some urgent help here....I am querying my database based on a DueDate field...and want to send an automated email to anyone that falls within two months PRIOR to this "DueDate", so far the Code is querying the database and trying to run a module I created, title SendMail, however it is having trouble sending the email for some reason... any suggestions as to why....here is the code:
0
1349
by: WI Projects | last post by:
Hi, A CMM Level 5 company is looking for Microsoft Business Intelligence (MS BI) professionals for its Hyderabad location. There is a an element of onsite travel & work to this position. Please keep the following points in mind before mailing your CV. 1. STRICTLY NO FRESHERS PLEASE. FRESHER CVs WILL BE IGNORED.
0
1812
by: WI Projects | last post by:
Hi, There is an urgent requirement for C++ (3-5 years experience) in a CMM Level 5 company in Hyderabad (with onsite in Europe for some of the positions) Please mail your CV to wiprojects@yahoo.com. However, please keep the following points in mind before mailing your CV. 1. STRICTLY NO FRESHERS PLEASE. FRESHER CVs WILL BE IGNORED.
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8894
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6210
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4384
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1787
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.