|
Yahoo doesnt provide free smtp/pop3 service so you cannot use your Yahoo id to send mails from any other email client.
To use Yahoo mail you wil have to buy the Pop3 Service from yahoo.
Rishav Raj
http://hashtech.erishav.com
|
|
|
|
|
I have an application I made that simply gets the current directory using System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location goes up a directory level and then runs a file in that directory using System.Diagnostics.ProcessStartInfo and System.Diagnostics.Process.Start. The file works fine if I run it on my computer but if I put the file on a Shared Network Path I get the below error:
Unhandled Exception: System.Security.SecurityException: Request failed.
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly a
sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur
ityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass
emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle
rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran
ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec
t assemblyOrString, SecurityAction action, Boolean throwException)
at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs
, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet
hodHandle rmh, Assembly asm, SecurityAction action)
at Setup.Program.Main(String[] args)
The action that failed was:
LinkDemand
The type of the first permission that failed was:
System.Security.PermissionSet
The demand was for:
<PermissionSet class="System.Security.PermissionSet"
version="1"
Unrestricted="true"/>
The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="USERNAME"/>
<IPermission class="System.Security.Permissions.FileDialogPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Vers
ion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Read="T:\ClientUpdate\"
PathDiscovery="T:\ClientUpdate\"/>
<IPermission class="System.Security.Permissions.IsolatedStorageFilePermission, m
scorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Allowed="AssemblyIsolationByUser"
UserQuota="9223372036854775807"
Expiry="9223372036854775807"
Permanent="True"/>
<IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="ReflectionEmit"/>
<IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Ve
rsion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Flags="Assertion, Execution, BindingRedirects"/>
<IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=
2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Security.Permissions.UrlIdentityPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Url="file:///T:/ClientUpdate/Setup.exe"/>
<IPermission class="System.Security.Permissions.ZoneIdentityPermission, mscorlib
, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Zone="Intranet"/>
<IPermission class="System.Net.DnsPermission, System, Version=2.0.0.0, Culture=n
eutral, PublicKeyToken=b77a5c561934e089"
version="1"
Unrestricted="true"/>
<IPermission class="System.Drawing.Printing.PrintingPermission, System.Drawing,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
version="1"
Level="DefaultPrinting"/>
</PermissionSet>
The assembly or AppDomain that failed was:
Setup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
The Zone of the assembly that failed was:
Intranet
The Url of the assembly that failed was:
file:///T:/ClientUpdate/Setup.exe
Any ideas on how to fix this?
|
|
|
|
|
Obviously, if it can be fixed at all, then it requires you to set the right permissions on your intranet.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
We were actually looking for a way to fix this through code. We don't want to tell everyone that uses our software that they have to change there intranet settings just to run one file.
|
|
|
|
|
i need to make communication between computer to another machine. and this communication like two communication. first i need data from another machine(make sure it is not computer. i have to connect it with usb com port) and then also send acknowledge from computer to another machine.
i did with it serial communciation.but it was text. i need to receive float data and also sending same data. also i need to identyfying where the next string started and when it will finished.
help reply for this as early as
Arpita Patel
|
|
|
|
|
Hi,
The problem of mixing floats and text needs some kind of protocol. One can come up with several schemes, it depends on the kind of [ero[heral device (speed, memory, language), and the relative amount of floats versus text.
For your float data there basically are two ways to approach this:
1. use binary data, i.e. send bytes, not characters.
2. use strings to represent your float data; either apply ToString() when sending, and float.TryParse() when receiving (=more bytes, and some loss of precision); or get the bytes of a float, and turn them into a readable string, e.g. using base64 conversion (=4 ASCII char for 3 bytes of data) or hex (=2 ASCII char for 1 byte of data).
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Perhaps XML serialization?
|
|
|
|
|
as the other device is "not a computer" I doubt XML is the way to go. Chances are the device has limited capabilities (limited CoreMark, few KBs of RAM, hardly an OS, C only, ...) and will dictate the way to go. we'll have to wait and see.
FWIW: Most of the time I avoided exchanging float data with small embedded systems; choosing an appropriate scale maps most physical stuff easily onto 16-bit integers.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
hey, i tried to share data between two form in different project under same solution. i have two project(project A,project B) in one solution and i want to send data from project A to Project B. and also at that time i want to activate form from project B and same time wants to close previous form. please help me in this case. i really stuck with it. i am using windows application in C# and doing serial communication.
please reply as soon as
|
|
|
|
|
arpi8319 wrote: please reply as soon as
?????
If they are in the same solution, means NOTHING. You need to use something like WM_COPYDATA, or if you want to be all modern, use WCF.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
Use WCF if these 2 projects are running in different app domains. Ensure to,
-Use Named Pipe binding (I assume that both are winform applications and running on same machine)
-Implement duplex contract for notifications.
Let me know if you need help for implementing this.
|
|
|
|
|
What is the command in c# .net to turn off a pc with windows xp ?
|
|
|
|
|
Have you tried to Google[^] for this? There are many articles out there on the topic. On my search the first hit is what you are looking for. Maybe this will help.
In C#, you could use System.Management classes and the WMI class Win32_OperatingSystem.<br />
<br />
The possible flags for controlling the system<br />
<br />
0 = Log off the network.<br />
1 = Shut down the system.<br />
2 = Perform a full reboot of the system.<br />
4 = Force any applications to quit instead of prompting the user to close them.<br />
8 = Shut down the system and, if possible, turn the computer off.
Next time google first and if all else fails post here.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Why not just run shutdown.exe with the correct command-line arguments?
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
|
First question. (Please don't hit me just because I'm stupid.)
I have a short-deadline (90-day) assignment to convert an almost-working Access 2000 application to C#.net. The application has fifty forms, covered with fiddly little fields that have to be precisely aligned. I am relatively inexperienced in C# .Net development, but I have learned the basics, and have completed several applications of a complexity similar to this assignment. The job is easily achievable within the time limit if the forms don't have to be drawn, but for me to draw them to an acceptable quality will take at least 90% of the time available for the project. Plumbing the code behind the forms holds little terror for me, and can be done easily within the time limit.
Here's the question: Does anyone know of existing software (Codeproject article, other article, commercial software, shareware) that can convert MSAccess 2000 forms to the Visual Studio .Net environment? Retaining the names of the objects would be nice, but not necessary, all I really need is the wireframes of the forms with the objects in their prior spatial arrangement. The development platform is XP.
Searching the web, EvolutionOne seemed to offer hope that I could do a three-cornered MSAccess>VB.Net>C#.Net kludge, but drilling down to their demo software found their website hollow. Looks like they died about 2002.
My bosses are willing to spend up to about 500 (US$)for a product that can do this with a short learning curve. Particularly when faced with the costs of hiring a squad of temporary mouse-wranglers to draw the hateful forms within the time allotted.
Any sensible suggestions will be regarded with gratitude.
"To do is to be." [Descartes]
"To be is to do." [Voltaire]
"Do be do be do..."[Frank Sinatra]
|
|
|
|
|
I looked a year or two ago, unfortunately I wasn't able to find anything, and don't think it exists.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
There is nothing that will convert Access Forms to C#, or any other language for that matter. Access Forms work quite a bit differently from others, so there is no real direct conversion possible.
You're going to have to redesign the forms, by hand.
|
|
|
|
|
Converting the app as a whole would be a massive undertaking, but if I understand correctly the OP would only need something to create the designer code on the real language side. That would be a significantly simpler task, unfortunately AFAIK there's no tool to even do that much.
It is a truth universally acknowledged that a zombie in possession of brains must be in want of more brains.
-- Pride and Prejudice and Zombies
|
|
|
|
|
Please visit Microtools.us website at http://www.microtools.us. ANETVC7, Access Whiz Option H can help you to convert Access forms to C#.
|
|
|
|
|
Just because you can use a tool to do [some|all] of the conversion for you, doesn't mean it's a good idea.
|
|
|
|
|
A possible approach would be to write some VBA in Access that iterates through the AllForms collection and the controls on each form and outputs their properties to a text file.
You could then use C# to parse the text file and create the corresponding forms in .Net.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
Most Excellent Answer, it would not have occurred to me, but YES, this did the trick nicely. I'm a developer who appreciate how Access puts the "Rapid" into "RAD", but yes, it sure is a bummer when you have 25 forms with 50 to 100 fields each (they are REALLY crowded), and then it's a "Yikes" I have to convert them by HAND! (eg. into Winforms for SQL w/ VB.NET or Web form for ASP.NET etc). But "Voila", after taking the suggestion of David R, life is good! OK, so I'm not done, but it's going well, "the nut is cracked" (as the squirrels say).
So rather than more platitudes, here is the code (below). As they say, "your mileage may vary", you will probably want a few more parameters (tabindex#, Locked etc), but this is the core.
I decided that "On Error Resume Next" was the easiest way to skip the errors that occur when a control is missing a property, for instance a label does not have a ControlSource. I hope this is clear enough as is, but please "drop me a line" if I can answer further questions. Time permitting, I'll turn this into a shareware offering (like the now dearly departed EvolutionSoft, what happened to them?).
Here is the Access VBA code "snippit":
("CTL" is abbreviation for Control; "CTL SRCE" is "ControlSource")
On Error Resume Next
FOR i 0 to Me.Controls.Count -1
OutFile.WriteLine("CTL- NAME: " & Me.Controls(i).NAME)
OutFile.WriteLine("_CTL SRCE: " & Me.Controls(i).ControlSource)
OutFile.WriteLine("_____LEFT: " & Me.Controls(i).Left)
OutFile.WriteLine("_____TOP: " & Me.Controls(i).Top)
OutFile.WriteLine("___WIDTH: " & Me.Controls(i).Width)
OutFile.WriteLine("___HEIGHT: " & Me.Controls(i).Height)
Next i
John A
|
|
|
|
|
I'd forgotten about this. Glad to hear it's going well.
You have to be careful trying to produce a general solution that will work with all versions of Access.
I did something similar (but a bit more complicated) in Access 97, only to find it broke in Office XP.
Microsoft changed the object model.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
Good point (& thanks for the follow up). My version is "MS Access 2002 (10.6771.6847) SP3", which I believe is the "Office XP" version. Seems like that makes it two versions ago, I normally keep to VB as there is less of that sort of stuff (oops, notwithstanding that big one from VB6 to VB.NET nine or so years ago - my how time flies!). At that, I'm still using the .NET Studio 2003 & 2005 versions (and still keeping a VB6 machine alive, for that matter).
But you are right, as one ponders a "product" even a shareware one, version compatibility is a consideration and finding a break in the object model is certainly enough to "ruin one's day". I will post again if/when I have useful further info that warrants it.
Best Regards, John A
|
|
|
|
|