|
hanzibal2 wrote: I'm not sure this is the right place for this so forgive me if it's not but here goes.
It looks like your tool is free, so post it in the Free Tools forum[^].
|
|
|
|
|
|
I'm working on a dynamic data website with linqtosql dbml file. Could anyone please help in giving some examples on how to update records displayed in a formview that allows paging? The formview exists in the "Edit.aspx" page with DefaultMode="Edit" and DataSourceID="DetailsDataSource" where "DetailsDataSource" is a LinqDataSource with EnableUpdate="true". The bottomrow of the formview contains a LinkButton with CommandName="Update" to perform the update operation. Once I change some info in the bounddatafieds and then click on the linkbutton, the formview loads with empty datafields and no updates are saved to the database.
Any help will be much appreciated.
Thank you.
|
|
|
|
|
how can i start a shell and execute a command and capture output using ganymed-ssh2 c# library
|
|
|
|
|
Considering that's a Java library, there is no direct way to use in .NET.
You'd have to use a "bridge" library to use that in C#. Something like JNI4NET[^] should do it.
As for exactly what you have to do with that SSH2 library, I have no idea. I've never used it nor will I as it's open source and there is no support for it at all.
|
|
|
|
|
|
Hi there !
I haved mapped a network resource to drive "S:". There is a need for username and password to access this path.
Now i'm tryin to write a Windows Service (by using a VS Windows Service Project), which does in a certain interval something with the files located on "S:"
I've tried to put the Account-Property of the corresponding serviceProcessInstaller-Instance to "User" and filled the Username- and Password-Properties with the values of the current User (who has the rights to access this path via windows explorer).
Before accessing some files, my code checks the directory
like:
if (Directory.Exists("S:\\SubDir"))
{
//do it !
}
If i copy my code to a default VS windows console project, it works! But by running my code in a Windows Service the Directory.Exists("S:\\SubDir")-Condition returns false.
Are there missing rights ?
can i include the credentials for accessing this path in my code ? maybe something like this:
SomeType DriveS = new SomeType("S:","username","password");
DriveS.TryToAccess();
Any Ideas ?
Jeff
|
|
|
|
|
Any Ideas:
Your service runs with an account which has no network access at all.
Run your service under an account which can access the the folder. You can change that in mmc.exe in the Properties page of the service.
|
|
|
|
|
Hi,
If you are using Shared folder in the network you may need to create networkconnection to connect using your network credentials.
Check this thread for your answers.[^]
Let us know if this is not working for you.
Thanks
-Amit Gajjar
|
|
|
|
|
Member 10027439 wrote: I haved mapped a network resource to drive "S:". There is a need for username
and password to access this path.
Two parts
1. Map drive
2. Provide credentials to access.
I don't see where you stated how you achieved the first.
|
|
|
|
|
You don't mention how you map the drive and on what OS it is. If you are mapping the drive in a login script on Vista or higher, you have to elevate the script to admin level to do the mapping. The problem is that it will not appear in user space even though it will show up in windows explorer. If your service is running under a user account, it will by default run in the limited user space and will not have access to mapped drives in the admin space. This is an infuriating implementation because Windows handles these issues for the console user but not for processes running as that user.
In this case, the solution is linked connections. There is a registry key you need to add called EnableLinkedConnections. I don't remember the path right now but Google will tell you. If you are mapping drives in a login script and running your service under a user account, you need the linked connections enabled on Vista or Win 7/8. If your login script is a powershell script, you can even set the linked connections from the script provided it is signed and you allow remote scripts to execute.
|
|
|
|
|
Hi guys !
Thank you for your replies !
@Bernhard Hiller:
I already tried this - Didnt work
@AmitGajjar:
Yeah, this solution works. But i have to use the real network path ("\\192.168.2.168\MyFolder") instead of "S:". Thank you !
@jschell / Jason Gleim:
Well... I'm using Windows 7 and mapped via windows explorer the network resource "\\192.168.2.1168\MyFolder" to a network share 'S:' without any scripts. (well i didnt guess the english term 'network share' ) By doing this via windows explorer i provided the needed credentials.
So my mind was that i can write a c# program which is logged in as the user who mapped the network share and because of this there will be no need for providing the credentials again in my code.
|
|
|
|
|
Hi...
I have one groupbox control containing two combobox in that .That groupbox is present in one form at perticuler location...I want to display that same groupbox control in another form with same loaction.without any issue of screen resolution.
Thanks
|
|
|
|
|
OK, go ahead, and if you have any problems feel free to come back here with a detailed question.
Veni, vidi, abiit domum
|
|
|
|
|
Create form in a external page and call this page by iframe at anywhere like....
<iframe src="external-page.aspx" width="300" height="300">
</iframe>
|
|
|
|
|
A single instance of a .NET control cannot be "in" two Forms at the same time.
So, some clarification from you would be helpful:
1. I assume you are using Windows Forms, but please confirm that. Some folks do use the term "Form" (incorrectly) when they are describing WPF.
2. is it the case that at any given time only one of the two Forms will be visible to the end-user, or, are there cases where both will be visible ? If both Forms can be visible, and you want to show your GroupBox on only one of them: what determines on which visible Form it is shown ? Another way of asking this question is to ask: is the location on the screen of both Forms the same... in which case, if their size, and other attributes, like FormBorderStyle, are the same: one will "cover" the other.
3. are both Forms identical in every way, but, location: size, FormBorderStyle, StartPosition, appearance, etc. ?
4. are you using the standard WinForms model in which the Program.cs file, in its static class 'Program contains a static 'Main method in which you have the usual code to start your application, like: Application.Run(new MainForm()); ? That may seem like an odd question, but there is a reason I'm asking it, which I'll explain once you provide more information.
5. what do you mean by: "without any issue of screen resolution;" what could a screen resolution issue be ? Could you mean, by this statement, a possible overlapping of the two Forms when both are displayed (made visible) ?
6. are you familiar with using static classes now ?
bill
Google CEO, Erich Schmidt: "I keep asking for a product called Serendipity. This product would have access to everything ever written or recorded, know everything the user ever worked on and saved to his or her personal hard drive, and know a whole lot about the user's tastes, friends and predilections." 2004, USA Today interview
modified 6-Sep-13 2:42am.
|
|
|
|
|
|
For static members, do you prefer
public static Type Member; or
static public Type Member; where public can be any of the visibility keywords.
I've found I use both , and I'm trying to find out if there's a best practice out there that makes sense.
Software Zen: delete this;
|
|
|
|
|
I prefer option 1, but whichever option you pick, consistency is the key!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I use both too, but tend to group the statics at the bottom of the class in it's own region.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I prefer to put visibility first, and for what it's worth, I don't think I would make a static field public.
|
|
|
|
|
Espen Harlinn wrote: I don't think I would make a static field public I normally don't, but for the purposes of the example...
Software Zen: delete this;
|
|
|
|
|
Fair enough
But then you never know who is following these discussions, and some will surely copy your code without a second thought ...
|
|
|
|
|
If they're copying the millifragment I posted, they're in more trouble than they know.
Software Zen: delete this;
|
|
|
|
|
Agree, but then, on the other hand, they probably wouldn't notice ...
|
|
|
|