472,984 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,984 software developers and data experts.

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 1750
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*****@wideweb.com.brwrote in message
news:c2**********************************@d77g2000 hsb.googlegroups.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*****@wideweb.com.brwrote in message
news:c2**********************************@d77g2000 hsb.googlegroups.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
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...
1
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....
5
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...
16
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:...
6
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...
3
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...
1
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",...
0
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. ...
0
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.