|
i think you need a 3side Controls to help you
|
|
|
|
|
hi guys!
need some help.
i m deploying a .net application using the .net setup project and also using the installer class to add some custom actions every thing is running fine..
but i want to rollback the setup if a condition does not matches.. for which i m using the
base.rollback(isavedstate) method but it gives an exception
that "savedstate might be corrupted" and then rollback the setup from the catch block..
i m searching for it from a long time but couldnt figured it out. can any one tell me what i m missing..
i wrote the code some what like this:
protected override void OnBeforeInstall(IDictionary savedState)<br />
{<br />
base.OnBeforeInstall (savedState);<br />
<br />
try<br />
{<br />
if(DialogResult.No==(MessageBox.Show("This Setup Will restart your Internet Infromation Service Mannager(IIS). Do you want to Continue ? ","Alert",MessageBoxButtons.YesNo,MessageBoxIcon.Hand)))<br />
{<br />
<br />
base.Rollback(savedState);<br />
return;<br />
<br />
}<br />
}<br />
catch(InstallException iex)<br />
{this.Rollback(savedState);<br />
<br />
}<br />
catch(Exception ex)<br />
{this.Rollback(savedState);<br />
}<br />
}
but it gets rollback in the catch block gining the error.
abhinav
|
|
|
|
|
Hello All,
Im Coding cluster Management functions in C# using the APIs. When I am trying to DLLImport for the API GetClusterGroupState as
I get an System.AccessViolationException that protected memory is accesses. Let me know the How shoud I use this API in c#. Here is my code.
[DllImport("clusapi.dll", EntryPoint = "GetClusterGroupState", SetLastError = true,
CharSet = CharSet.Unicode, ExactSpelling = false, CallingConvention = CallingConvention.StdCall),
SuppressUnmanagedCodeSecurityAttribute()]
internal static extern int GetClusterGroupState(
IntPtr hClusGroup,
out string strOwnerNode,
[MarshalAs(UnmanagedType.I4)] int nNodeNamebuf);
Thanks
|
|
|
|
|
Hi
Is it possible to show animated gif in DataGridViewImageCell?
It is need to use ImageAnimator in Paint event
ImageAnimator.Animate(image, new EventHandler(animate))
ImageAnimator.UpdateFrames();
but which method call in animate?
private void animate(object o, EventArgs e)
{
....
}
Any method which force Paint event? Which? Invalidate is not available for the cell.
Thanks for an advice
Ela
|
|
|
|
|
Hi Everybody.
does anybody knows why I can´t debug with framework 2.0.50727? even when I actived the "Enable Debug" option in the IIS configurations for ASP .NET, in "Edit Global Configuration" and in "Edit Configuration"?? I ran the aspnet_regiis.exe with the option "-i" but get nothing; I'm working in VS 2003 (7.1.3088).
Now I'm working with Framework 1.1.4233.
I need because I can´t access to the items of a ListBox after I bind it, but once I change to Framework 2.0.50727 and run it direct from my web browser I don´t have any problems.
Grettings and thanks for your help.
|
|
|
|
|
You cant debug .NET 2 with VS2003. You have to use cordbg or the GUI debugger included with the SDK or use Visual Studio Express.
|
|
|
|
|
Ok thanks, now I get it.;)
But anyways, what I commented about the ListBox, does anybody knows what about that (accessing the items after bind the control)?
|
|
|
|
|
I want to display the cpu and memory use ration on the dialog,but I don't know how to write the code?who can help me!
|
|
|
|
|
for this you have to use Windows Management Instrumentation (WMI) classes
Add Reference to System.Management Namaspace From AddReference OPtion of your Solution Explorer.
Luck is Opportunity with hardwork
|
|
|
|
|
I want to display the cpu and memory use ration on the dialog,but I cann't know how to write the code?who can help me!
|
|
|
|
|
a good start would be to take a look at: System.Diagnostics.PerformanceCounter that
allows you to get the CPU usage.
|
|
|
|
|
Hi,
I have read few articles about localization, and I have stumble across one big question how can someone edit my localized (dll) file ???
I want to add option (if there is such possibility) for my users to change localization files by themself, but I dont know how to do it?
So as far as I know after compiling from resx file generates dll file that can be later used for localization, so there is no way it can be xml file or such so that it can be edited?
Any healp?
Big thanks!
|
|
|
|
|
For "amateur" translations - which is probably what you have if you expect the users to do the translation - look at WinRes.exe (part of the SDK). It works on the .resources files as far as I remember - but you can easily making a tool extracting these from the DLLs. The .NET linker can create a DLL from the translated .resources file. Notice you have to be careful getting the name of the embedded resources right, but it's not too hard if you make a sample with VS and see how it names everything.
For professionel translation buy a commercial localization tool so you get support for leverage etc.
For enterprise level translation, make your own tool, as the commercial solutions simply sucks if you get a high level of text and updates flowing though your localization process.
|
|
|
|
|
Do you know if there is any sample code around for any of this solutions ?
Thank you.
|
|
|
|
|
1) Search for WinRes on Google. I know it exist, I never used it.
2) Contact a translation vendor and let them deal with it - you give them the DLL with the English text embedded, they return translated DLL's (in case they are signed you need to work with them how their tool can support this - possibly though delayed signing).
3) This should only be done by enterprises - if you are not working for a company at least 3 software developers in a deticated localization team (NOT localization engineers - the entire localization team will probably be at least 15 people before you have the 3 developers) this is not the option for you. Such a localization team will also be experienced in using third party localization tools and can hence make the judgement on when your translation volume is so high that they no longer can keep up using the standard 3rd party tools.
Unfortunately Microsoft made some serious design errors in the localization file format of .NET, but it is still best to follow the standard .NET localization methods instead of inventing your own XML format.
|
|
|
|
|
Well I wanted to create my application so that anyone can edit file, for instance I give application to my friend in France, he takes it and translates it into French without having to play around with WinRes resgen and other things .
Thank you anyway for you`r response.
|
|
|
|
|
Hi,
I am using .Net Framework 1.1
Is it possible to watch a directory for any changes,like we have FileSystemWatcher for files.
(or)
Is it possible to raise an Event if a shared directory is being accessed in windows.
Actually my problem is simple, I have an application in which i have to monitor network access.If a user in the network tries to access a folder in the network a message is sent to the server indicating that a user is trying to access the network.The server decides to allow or deny permission for the user to view the directory at random.
note:I have a service running in the server and another in the client.
Any Ideas ..,
Thanks un advance...
Luck is Opportunity with hardwork
|
|
|
|
|
sundar156 wrote: Is it possible to watch a directory for any changes,like we have FileSystemWatcher for files.
You can use the FileSystemWachter for watching Directories (look in the documentation for "FileSystemWatcher class, about FileSystemWatcher class").
It should work, as I know, but I'm working with .Net 2.0
Regards,
Ingo
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
thanks for the reply...
But a
FileSystemWatcher can only watch for created ,Renamed ,Changed,Deleted Events...(i Have to generate an event when a user clicks on the folder or file i.e before he opens a file)
I should not allow the user to open the folder/File untill the Server(or an admin in the server machine) permits.
Any help is appreciated....
Luck is Opportunity with hardwork
|
|
|
|
|
sundar156 wrote: But a
FileSystemWatcher can only watch for created ,Renamed ,Changed,Deleted Events...(i Have to generate an event when a user clicks on the folder or file i.e before he opens a file)
I should not allow the user to open the folder/File untill the Server(or an admin in the server machine) permits.
Ok, now I see your problem. Well thats difficult. It has something to do with the rights management and I think it can't be solved easily.
I don't know a really good solution but I got an idea. You could just regret the user the access and allow your own application the access. A user has then to use this application to open a file/directory forbidden to him. Of course than it's possible to ask the admin.
Sound silly? Perhaps, but I don't know another way, yet. I haven't done anything with file rights management yet.
Sorry,
Ingo
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
Hey, I keep getting the UnauthorisedAccessException from the following code - the user account I'm using to connect to the server in question does have permission to read/edit the registry. I have also modified the my routing table so I can access the server resources by name. If anyone could help me out I'd greatly appreciate it.
using System;<br />
using System.Security;<br />
using System.Security.Permissions;<br />
using Microsoft.Win32;<br />
<br />
[assembly: RegistryPermissionAttribute(SecurityAction.RequestMinimum, Read = @"HKEY_LOCAL_MACHINE\SOFTWARE\Network Associates\TVD\Shared Components\VirusScan Engine\4.0.xx")]<br />
[assembly: SecurityPermissionAttribute(SecurityAction.RequestMinimum, UnmanagedCode = true)]<br />
<br />
String KEY = "SOFTWARE\\Network Associates\\TVD\\Shared Components\\VirusScan Engine\\4.0.xx";<br />
<br />
try<br />
{<br />
RegistryHive hKey = RegistryHive.LocalMachine;<br />
<br />
RegistryKey DATKey = RegistryKey.OpenRemoteBaseKey(hKey, _ServerName).OpenSubKey(KEY);<br />
}<br />
...
It seems to get past the RegistryHive.LocalMachine part, but throws the exception when it gets to the open remote base key call. I tried separating the OpenRemoteBaseKey() and OpenSubKey() calls into 2 separate lines, to see if it was maybe OpenSubKey() that was throwing it, but the same exception was thrown on the OpenRemoteBaseKey() call.
Thanks.
|
|
|
|
|
b_girl wrote: UnauthorisedAccessException
It means you have to be authenticated and have permissions on the server.
|
|
|
|
|
I am authenticating with the server and the account I'm authenticating with has permission to read/edit the registry. I'm doing the authentication when I connect - I'm using the Ras API to establish a VPN connection to the server.
Do I have to authenticate again after the connection is established?
|
|
|
|
|
I have a C# .Net application which generates a XML file on the web server when the user clicks on a button. After that file is produced, I need to be able to push that xml file to the client machine (preferably with an open dialog box so the user can choose the destination). I am thinking this can be done with Response.Write, but I have not been successful. Thanks.
|
|
|
|
|
You could use the WebClient class
Try this:
string URL = "http://www.somesite.com/filename.fileExtention";
string localLoc = "C:\\filename.fileExtention";
System.Net.WebClient c = new System.Net.WebClient();
c.DownloadFile(URL,localLoc);
You could use a browse dialog for the location to save the directory.
Hope that helps,
K
-K
|
|
|
|