Click here to Skip to main content
12,301,983 members (56,788 online)

Comments by Dave Kreskowiak (Top 200 by date)

Dave Kreskowiak 2hrs 20mins ago View
   
Do not reply to 4 year old questions. Make you own thread. Chances are pretty good you're not going to get an answer from this person.
   
Why are you answering a FIVE YEAR OLD question?
Dave Kreskowiak 3 days ago View
   
No relationships? Yeah, that's doesn't sound like a good thing. That sounds like a small database that really isn't doing much of anything.

It's possible and probably just as easy as I've shown. Truthfully, I'd probably scrap the database and create a new one, importing the data from the old database.
Dave Kreskowiak 3 days ago View
   
It's possible, but using Code First to do it this way is not going to be fun. You have to configure everything to match the existing database by hand and you better get it right! Failure to do so will result in screwy things happening to the database and possible hosing up your data integrity.

A better choice would be to use Database First instead. That way you get all the relationships discovered and done for you.
Dave Kreskowiak 3 days ago View
   
This tells us that you copied the code off the internet but you have no idea how it works.

"mangw"? Never heard of it. Don't know what it is.

Windows abstracts all the hardware from your code. You do not have the ability to directly manipulate ports without a kernel driver.
Dave Kreskowiak 3 days ago View
   
Well, the problem is that whatever is doing it IS authorized.

Just use Process Monitor[^] to figure it out.

This is not a coding issue, but a permissions issue. Whatever code is running under whatever account has more permissions than it needs to do its job.
Dave Kreskowiak 3 days ago View
   
Locking is there to piss off your DBA's. The record is locked for the extent of the query but is VERY difficult to manage properly. Think about this. You app locks a record and then crashes. The lock doesn't reset itself. It's stuck until someone manually unlocks the record or some other piece of code recognizes the problem and unlocks it.

The way you seem to try to use the locks is wrong. The lock only applies for as long as a SQL Transaction is active. You don't appear to be using one so the lock really isn't doing anything.
Dave Kreskowiak 3 days ago View
   
If done properly, yes it does.

You have to do have a status for each "phase of a record, which includes "just checked out but not processed yet".

You grab the record and immediately try to change it's status to "flag it checked out". If that fails, then some other service has the record and this service has to abandon it and go get another one.
Dave Kreskowiak 4 days ago View
   
Not easily done at all.

Back the truck up here for a second. What are you really trying to do with this? It sounds like your'e trying to implement your own idea of "security" for a file(s) and that's never a good idea.

Why couldn't you just use NTFS permissions to accomplish protecting a file?
Dave Kreskowiak 4 days ago View
   
OK, and the problem would be .....?
Dave Kreskowiak 4 days ago View
   
It works because he wrapped the code in a try/catch block that just ate the exception that the code would normally throw. This is BAD PRACTICE.
Dave Kreskowiak 4 days ago View
   
NO!! I keep telling you to check the index you get against the bound of the arrays before you try to look them up. It's that simple!
Dave Kreskowiak 4 days ago View
   
What are you talking about? Fields? Fields for what? And what's a "List<> form"?
Dave Kreskowiak 4 days ago View
   
It probably wasn't the best description. You can still launch a remote process, but if the process sits and waits for user interaction, like a Windows Forms app, it'll never get any.
Dave Kreskowiak 4 days ago View
   
You're going to have to wrap the collection in a class and use COM-exposed methods in that class to manage the collection which VB6 will be able to call. You're not going to be able to use a .NET collection class directly.
Dave Kreskowiak 4 days ago View
   
I'm taking this as he's trying to launch an executable on a remote machine so that it's visible to the user logged into the remote machine. That's not going to happen.
Dave Kreskowiak 4 days ago View
   
No, same problem.
Dave Kreskowiak 4 days ago View
   
Well, if you're going to ask I'm going to point the finger at you. Your post gave no context information what-so-ever and your sentences were so terse as to be completely useless. We had no idea what you were really looking for.

There's a ton of information out there. All you have to do is Google for "RSA algorithm".
Dave Kreskowiak 4 days ago View
   
If it's not valid, you just return out of the method! You don't do anything with it.

Your code can only work with real index values. Anything outside of that range isn't valid and the code shouldn't do anything at all in that case.
Dave Kreskowiak 4 days ago View
   
So a "target" can be any object, which you're going to have to train the code how to recognize. Good luck with that.

Recognizing objects is an extremely complicated task and the fewer objects you're looking for the quicker you can train the code.

As for any other part of this, I think you're going to be doing this on your own research.
Dave Kreskowiak 4 days ago View
   
Yeah, and? I already told you why this is not going to happen.
Dave Kreskowiak 4 days ago View
   
Oh, and the Process class cannot be used to do it. It must be done through WMI and the "Win32_Process" class.
Dave Kreskowiak 4 days ago View
   
So what? The user on that machine will NEVER see if running. This is to prevent someone from compromising security and getting a malicious .EXE running on the client that asks for users credentials.
Dave Kreskowiak 5 days ago View
   
Yeah, and? I already told you how to defend against it.
Dave Kreskowiak 5 days ago View
   
Advise on what? You haven't asked a question or stated any kind of a problem.

Who's grid are you using?
Dave Kreskowiak 5 days ago View
   
I have no idea what your question is. All we know is that you have a Windows Service and a second Windows Forms application that talks to it? So what's the problem?
Dave Kreskowiak 5 days ago View
   
You want to charge the customer for every time they use your tool to create a "Release"? I assure you, NOTHING will get your tool uninstalled faster!
Dave Kreskowiak 5 days ago View
   
Now you're talking about steganography. The weaving of data you want to hide into the stream of bytes that is another file.

Google for "C# steganography video files".

So what exactly are you doing because this thread has wandered all over the place. I have no idea what you're really trying to do anymore.
Dave Kreskowiak 5 days ago View
   
As the error message says, you need to run the installation with an administrator account. A normal user account will not have permissions to write to protected parts of the registry of the file system.
Dave Kreskowiak 5 days ago View
   
OK, there's an SQL Server instance called SQL1008R2 on a machine called KNW-DEL-ABDUL. The database name, by default, is going to be "[namespace].DAL".
Dave Kreskowiak 5 days ago View
   
I've taken it as far as I can go. I've already told you what the possibility is. At no point did you ever show what the connection string was that is called "TestConnectionString". I've told you where to find it.
Dave Kreskowiak 5 days ago View
   
All I can tell you is that you're looking at a different database from what the code is looking at. Like I said before, double check everything in the connection string in your app.config file.

You're looking at a different database than the code is. There is no other possibility.
Dave Kreskowiak 5 days ago View
   
Well, the code is saying there's no data in the table. That would lead me to believe the connection string is looking at some database that you are not.

You didn't show any code putting data into the table, so does that mean that you typed the data directly into the table?
Dave Kreskowiak 5 days ago View
   
Everything LOOKS ok. I'd really avoid using the field name of "Id" because in larger databases you're going to have a ton of these running around and it's just going to make your life hell if you have to figure out which "Id" is which.

Verify the connection string points to the database you expect it to and on the server you expect it to. Use whatever manager app your database engine uses to verify the table "ExployeeTable" exists and that there is data in it.

No, NULL's in those fields won't do anything.

The code is telling you that the table is empty. So you have to verify that you're looking in the same place the code is looking.
Dave Kreskowiak 5 days ago View
   
There is no format for a datetime. You're going to have to ask huim where he got it from since you gave us no context to work with.
Dave Kreskowiak 5 days ago View
   
First, DAL is a bad name for a DbContext class. You can have multiple DbCOntexts in your application all looking at the same database, so it's better to call them exactly what they are.

Second, set the breakpoint on the "return Json..." line and you can look at the collection immediately above it.
Dave Kreskowiak 5 days ago View
   
Which grid? What's the full namespace for it? What type of application? WPF? Winfows Forms? ASP.NET?
Dave Kreskowiak 5 days ago View
   
The immediate window will not work with EF queries. You have to force the query to execute (remember, EF loves deferred execution!) and then look at the resulting collection. If you force an execution while the code is stopped you run into this problem.

I normally do it by putting a .ToList() on the end of the query to force the query to execute and rehydrate the objects into a List collection.
Dave Kreskowiak 5 days ago View
   
You just posted this as a SOLUTION to your own problem.

Hit either the "Have a Question or Comment" button to reply to that post or the "Reply" button.
Dave Kreskowiak 5 days ago View
   
You just posted this as an answer to your own question. Don't do that.

Click the Reply button to the post you want to reply to.
Dave Kreskowiak 5 days ago View
   
Which mode of EF are you using Database First, Code First, or what?
Dave Kreskowiak 5 days ago View
   
WHy are you answering 5 year old questions?? Don't.
Dave Kreskowiak 5 days ago View
   
OK, that means absolutely nothing.

What is a "target"? How are you going to find it? How do you define "difficulty" in this context? What algorithm(s) are you going to use/create to find these "targets" and evaluate their "difficulty"?
Dave Kreskowiak 5 days ago View
   
Now, as you're updated question, once you've woven your data into the stream, it can no longer be compressed without losing data.
Dave Kreskowiak 5 days ago View
   
Well, you're not going to be able to encrypt a block of data and leave the rest of the frame alone. Encrypting that data corrupts the crap out of it. It's either the entire video, or you've got a massive problem on your hands.

Also, you're not encrypting a single block of a frame. You're encrypting each line in the block you're trying to encrypt in each frame individually! For example, each line of video is, say, 400 bytes long. The face you're trying to encrypt is about 80 bytes wide in the center of the frame. This means that you're leaving alone the first 160 bytes of the line, encrypting the next 80, and leaving the remaining bytes in the line alone. This "stride" is repeated for each line in the frame until you reach the end of the block you're trying to encrypt.

Now, you've got a much bigger problem. The block of video you're replacing may be 80 bytes wide, but the encrypted block of bytes you get back will probably NOT be 80 bytes wide. You just completely corrupted the entire frame because now it's much longer than the video codec decoding this crap expects.

What you want to do is STILL not possible the way you want to do it.
Dave Kreskowiak 24-May-16 8:39am View
   
That's the "AJAX Control Toolkit". Yes, it matters. There are a ton of control libraries that are based on AJAX.

If you're not specific, people start to make assumptions that can lead you down the wrong path.
Dave Kreskowiak 24-May-16 8:31am View
   
The way you describe is going to be extraordinarily difficult. You're going to have to write a codec to encrypt regions of an image WITHOUT corrupting the image data. That's going to be pretty much impossible along with being very CPU intensive.

The better solution is to encrypt the entire video, not just a portion of every single frame.
Dave Kreskowiak 23-May-16 19:03pm View
   
So what's the problem?
Dave Kreskowiak 23-May-16 16:28pm View
   
Who's combobox control are you using? The version of AJAX you're using doesn't matter as there really is no such thing. Are you using a Toolkit based on AJAX? That has a version.
Dave Kreskowiak 23-May-16 16:08pm View
   
Don't reply to 5 year old questions!
Dave Kreskowiak 23-May-16 11:27am View
   
No you're not. VS2015 doesn't have any tools built in to create an MSI. Are you using InstallShield LE?
Dave Kreskowiak 21-May-16 13:35pm View
   
There are only two ways to know if a device is at an IP or not. One is to ping it, the other is to actively try to connect to it on every possible port, and even then it's not guaranteed that there is NOT a device at that IP.

The device could be setup to not respond to pings or it could be on the other side of a firewall or router filtering out such communication.
Dave Kreskowiak 21-May-16 13:31pm View
   
It's either done here, out in the open, or your discussion doesn't happen at all.
Dave Kreskowiak 21-May-16 9:08am View
   
Uhhhh... you have no idea what the relationship between jQuery and javascript is, do you?
Dave Kreskowiak 20-May-16 22:25pm View
   
The feature should have nothing to do with this.

Does this Win7 machine have SP1 installed? If not, you MUST install it.
Dave Kreskowiak 20-May-16 18:36pm View
   
You're getting that probably because you're not installing it as an admin. Right-click the installer pick "Run as administrator".
Dave Kreskowiak 19-May-16 13:17pm View
   
You might want to ask the people from where you obtained the code. It's is extremely unlikely anyone here who has used this library is going to stumble upon your question.
Dave Kreskowiak 19-May-16 13:06pm View
   
Yeah, don't show the password at all! Setting the PasswordChar property on a TextBox does NOT encrypt the password in memory. It can STILL ne retrieved fairly easily if you know what you're doing. So, the secure way of doing it is to NOT show the password at all.

Now, if you're storing password in clear text in a file, you should be smacked in the face. This is a MASSIVE security risk. There are plenty of articles on the web that show how to properly store password as cryptographic hashes, like Password Storage: How to do it.[^] and Salted Password Hashing - Doing it Right[^].
Dave Kreskowiak 19-May-16 8:39am View
   
OK, it sounds like you didn't even try to start this, so.....
Dave Kreskowiak 19-May-16 8:36am View
   
Not enough detail to answer. Over Telnet? OK, what you write is HIGHLY dependent on the remote system, it's command line interface, what it allows you to do on that command line, the file you're editing, how you're editing it, what you have to look for to make sure you have the correct lines in the file, ...
Dave Kreskowiak 19-May-16 8:32am View
   
My first question was WHY?

Why are you even showing passwords in a DGV? This leads me to believe that you're storing passwords in clear text which is a HUGE security risk!
Dave Kreskowiak 18-May-16 16:07pm View
   
You're going to have to provide a lot more detail. WE have no idea what you're doing, what you did, how this message came up, ...
Dave Kreskowiak 18-May-16 14:26pm View
   
No, because ASP.NET code (C#) runs entirely on the server, never the client. ASP.NET code just generates HTML pages and sends that to the client, complete with any CSS files, other content, client-side script files (javascript), ...

THe only "source" the browser gets to see are the files that are sent to the browser in order to render and interact with the page, HTML, CSS, javascript, ... NEVER the *.cs files.
Dave Kreskowiak 18-May-16 8:30am View
   
You cannot create or touch UI controls from anything other than the UI (startup) thread.

You didn't say which UI you were using, WinForms or WPF...
Dave Kreskowiak 17-May-16 8:46am View
   
And the error message would be ....... ? Hint: The most important piece of information you can use to troubleshoot the problem.
Dave Kreskowiak 16-May-16 12:56pm View
   
You posted this question yesterday. Do not repost it again. If you've got questions about the answers you've gotten, go back to the original post and reply to those answers.

Posting the same question again is just going to piss people off, especially the ones you've now ignored, and just get YOU ignored.
Dave Kreskowiak 16-May-16 11:52am View
   
Really? This question is 5 YEARS OLD!
Dave Kreskowiak 16-May-16 8:48am View
   
First, this question is 2 years old. Why are you answering it?

Second, your answer has nothing to do with the question at all.
Dave Kreskowiak 14-May-16 12:06pm View
   
I hate to say this but you're wrong. Sergey is correct in that, being a noob, part of the process is learning the correct terminology and concepts. Just when asking questions, using the wrong terminology can really confuse people.
Dave Kreskowiak 14-May-16 9:41am View
   
What do you mean, precisely, by "cascade update"?
Dave Kreskowiak 13-May-16 13:15pm View
   
I don't think anyone has a clue what you're talking about.

Configure what and in which application? How is this supposed to be done?
Dave Kreskowiak 13-May-16 9:49am View
   
OpenXML SDK does NOT work with datatables. Where did you get that from?

It'll create an Excel workbook from scratch and you can do anything in it to arrange data however you want and format it.
Dave Kreskowiak 13-May-16 9:48am View
   
The exodus of open source developers for it. Oracle doesn't have a problem with the number of users using it, just the number of developers writing for it. Those numbers of been dropping ever since Oracle bought Sun and all the open source projects they had, including MySQL.
Dave Kreskowiak 13-May-16 7:37am View
   
That's going to be a question for Microsoft Support, not a forum post.
Dave Kreskowiak 13-May-16 7:30am View
   
Ahhh, the joys of using code off the Internet without understanding what it does or how it works. :)
Dave Kreskowiak 13-May-16 6:49am View
   
I haven't written code like this in over 20 years. You're treading around around in an environment and type of application that nobody has messed with in at least 15 years. The support base for this kind of app is down to nearly 0. DOS and TSR apps have been dead for quite a long time now.
Dave Kreskowiak 12-May-16 19:56pm View
   
That is a function of your Google mail account on Googles mail servers, NOT of your code.
Dave Kreskowiak 12-May-16 17:52pm View
   
You don't do anything. Emails, by default, are considered good until someone tells either the email client or the email servers transferring the emails that they are bad, either by email content or by sender.
Dave Kreskowiak 12-May-16 17:02pm View
   
Are you seriously writing a DOS app? Who runs DOS anymore?
Dave Kreskowiak 12-May-16 15:35pm View
   
AND WHICH PART OF THIS SETUP ARE YOU WRITING CODE FOR? The device or the PC?
Dave Kreskowiak 12-May-16 15:34pm View
   
Open up the Control Panel Add/Remove Programs or Programs and Features and go find which version of SQL Server is installed. Without that, you're just guessing at what you've got.
Dave Kreskowiak 12-May-16 15:33pm View
   
Start Googling and don't stop until you find one. I couldn't find one at all.

Better yet, get on Android development forums and see if anyone knows.

Developer Support Resources | Android Developers[^]


Dave Kreskowiak 12-May-16 14:58pm View
   
You simply don't have a choice. The problem with including just the referenced .DLLs (as I explained above) is that some of this stuff REQUIRES the software that your users won't install, like Service Packs, just to get some of these .DLL's working.

Either the users install all the required updates and the .NET Framework to run your app or they don't run your app, not matter what .DLL's you include with it. It's that simple.

If this is a problem for you and your users, you have no choice but to rewrite your app in C/C++ (NOT C/C++ CLI!). The runtimes for applications written in C/C++ have smaller requirements to being installed, but the application developement process is going to be much harder on YOU. You're not going to have the benefits of the .NET Framework to do stuff for you.

XP Home and Pro didn't come with any version of the .NET Framework installed into the O/S. You had to install it separately. Even then, the version that came on the install media for XP was always a .NET 1.0 or 1.1 version.
Dave Kreskowiak 11-May-16 20:51pm View
   
Why did you post this to a 4 year old question? Your answer has nothing to do with the question.
Dave Kreskowiak 11-May-16 10:04am View
   
First, why would your application even care?

Start reading these[^]. This isn't as simple as you would want.
Dave Kreskowiak 11-May-16 8:42am View
   
That's where you're wrong. The memory is reserved but NOT unavailable to Windows. If Windows is running low on resources, the .NET CLR will happily deallocate unused memory in its heaps and return it back to Windows.
Dave Kreskowiak 11-May-16 8:33am View
   
The problem with using Task Manager (or the values it uses) is that you're not getting a value that's accurate. You're getting the amount of memory RESERVED by the .NET CLR for your application, NOT the amount of memory your application is actually using.

For that, you need to use the .NET Memory performance counters.
Dave Kreskowiak 11-May-16 8:26am View
   
Use the debugger and find you'll see that your query is returning 0 rows. You're setting the variable i to the number of rows in this "stureg" table. That table has 0 rows in it. Your code is assuming that the table will always have more than 0 rows in it.
Dave Kreskowiak 11-May-16 8:20am View
   
You're going to have to go back to the SMS vendor and ask them for the documentation and any samples for using this mysterious API. Seriously, no two API libraries works the same way and without knowing what you're using it's impossible to tell you anything more useful.
Dave Kreskowiak 10-May-16 13:55pm View
   
You're already doing it. You wrap the call to GetPropertyValue in a Try/Catch block. You could just make this its own method so you don't have to write the same code over and over again.
Dave Kreskowiak 10-May-16 9:01am View
   
DateTimes don't have a format. Your question doesn't make sense.

Are you saying that you're passing datetimes back and forth to SQL server as strings? Did you store these values in your database as strings? If so, you made a monster of a mistake. NEVER store datetime values as strings.

DateTime values in strings with formatting are for presentation in the UI, not for storage in a database or passing in code.
Dave Kreskowiak 10-May-16 8:57am View
   
You don't. .NET code can be obfuscated using any one of a number of tools out there but there is nothing that will stop someone from decompiling the code.

As for a certificate, there's quite a number of authorities out there, like Verisign, Thawte, GlobalSign, ... Just Google for "buy code signing certificate" and you'll come up with a bunch.
Dave Kreskowiak 10-May-16 8:44am View
   
So you didn't buy a certificate from a trusted authority? Well, now you know why other machines won't trust you as a publisher. The certificate is trusted only by YOUR machine.

If you want other machines to trust you as a publisher you have to buy a certificate from a trusted authority and sign your assemblies and installers with it.
Dave Kreskowiak 10-May-16 8:29am View
   
OK, where did you get the certificate from?
Dave Kreskowiak 9-May-16 20:19pm View
   
"ach card needs to have an image of the game on it, so I specified and image path as one of the categories in the document. Now I need to have an html class (the kind you would call to in a div) for each document so I can call that image path specified in that document to display that background for each card."

I took that as two separate images.
Dave Kreskowiak 9-May-16 16:17pm View
   
I already did. If you want individual backgrounds for every game, along with every game image, you're going to have to provide a background image. BOTH pieces of information are going to be required for what you want to do.
Dave Kreskowiak 9-May-16 15:15pm View
   
The "print" verb is the giveaway. He's launching the document (I'm assuming) and the rest of the Process object setup looks like a command like Explorer would use to launch a print job if you right-clicked a file and picked Print.
Dave Kreskowiak 9-May-16 13:59pm View
   
You know this question is from 3 years ago, right?

You really haven't added anything to the discussion ... that ended 3 years ago.
Dave Kreskowiak 9-May-16 13:07pm View
   
That's because of YOUR system, you have all the applications installed to do the printing. That's what the verb = "print" does. It launches the registered application type for the extension you launched and adds a command line switch to tell it to print the document.

I don't care if it worked on your machine. Office is STILL not supported and guaranteed to work in a non-interactive environment. You can NOT use it from a Windows Server and expect it to work.
Dave Kreskowiak 9-May-16 10:39am View
   
OK, so you have to remove the background-image from the popular-games style. You also have to remove the gamebackground ID from the div it's in otherwise every DIV on the page that uses this template will have the exact same ID. You have no way of telling them apart.

You're going to have to supply a different image for each div somehow, and that it data driven. You cannot have a separate class for each record in the database. It just isn't practical.
Dave Kreskowiak 8-May-16 22:54pm View
   
That doesn't say "separate class" to me. That says the background image is just another image not different from the game image you have. It would just be additional data just like the game image.
Dave Kreskowiak 8-May-16 22:40pm View
   
Copying and pasting exactly what you have above doesn't improve the description at all. We need to know what you mean by "HTML class". Why does every "card" have to have it's own class?
Dave Kreskowiak 8-May-16 12:54pm View
   
Yeah, I wasn't waiting around for a UI type answer.
Dave Kreskowiak 7-May-16 18:03pm View
   
Sigh.... you're not understanding anything nor are you properly explaining what you're doing.

Do you have an embedded device doing something that it needs to report back to a program running on a PC over a serial port?? Where is this code that you're writing going to be running? On the embedded device or on the PC?

Dave Kreskowiak 7-May-16 17:36pm View
   
Does this embedded device run any version of the .NET Framework?

If not, then no you can't.
Dave Kreskowiak 7-May-16 15:10pm View
   
Sure, but we STILL don't have any idea what you're doing with this code.

There are still a ton of unknowns you haven't told us anything about and chances are really good you're going to end up scraping this code and rewriting from scratch.
Dave Kreskowiak 7-May-16 14:46pm View
   
That's not going to happen. First, I'm not running code I don't trust on my machine and second, there is an external library that code needs that I'm not going to have nor am I going to chase it down.

I also don't have VB6 as it's been dead for quite a long time now and I've been using .NET for the last 15 years.
Dave Kreskowiak 7-May-16 11:38am View
   
I know the example is a bit contrived, but I was pressed for time.

You are correct. There are too many people running around who have pigeon holed themselves into one particular application or type of application that think that qualifies them as an experienced developer.

I've interviewed people who tell me they'd been developers for 5+ years but yet couldn't tell me the difference between a "public" and "private" method.
Dave Kreskowiak 7-May-16 11:37am View
   
You're kidding?

In your case, this would be just a machine setup to test your application and test your deployment to it.
Dave Kreskowiak 7-May-16 10:18am View
   
Yes, you're going to have to republish it again using whatever means you did it before. Yes, it's going to have to be installed on the client machine. How else are they going to get the updated code?

We have no idea if their saved values or database will be retained. That is up to your code and your publishing method. The only way to answer that question is to test it before you publish it to production.

You DO have a test environment, don't you?
Dave Kreskowiak 6-May-16 11:12am View
   
You can't.

Anything that shows up in the browser window has to be done by client-side code. You can't show anything from your server-side code.

ASP.NET code runs entirely on the server. All it does it generate HTML/script pages and sends that to the browser for it to display. It's a rather simple process called "request-response". The browser requests a page from a URL, the server-side code listening at that URL generates the HTML and send it back to the browser. The browser then renders the HTML on screen. There is no continual connection between the browser and the server and no method that a web server can push content to a client without a request.
Dave Kreskowiak 6-May-16 10:01am View
   
Actually, it's not a lie.

Yes, SVCHOST does this, only because it's a Windows internal app that doesn't have any documentation at all. Your service cannot use it.

Your service still can NOT open a UI on a user desktop. Period. End of story. Trying to force it to do so only makes your code possibly incompatible with future Windows, i.e. WinXP to Vista and above.

Good luck trying to get it to work.
Dave Kreskowiak 5-May-16 20:26pm View
   
How are you putting the focus on the destination window? How does your app know when to send the keystrokes?
Dave Kreskowiak 5-May-16 15:14pm View
   
Whatever "GCM" means....
Dave Kreskowiak 5-May-16 10:44am View
   
As Chill60 has said already, you REALLY need to try and avoid using a CURSOR whenever possible. Cursors do not scale well as they will run slower and slower the greater the number of records you have the Cursor iterating over.
Dave Kreskowiak 5-May-16 10:06am View
   
The "eventcreate" command does not create an event source. It's used to create event log entries, which still requires admin permissions.

There is no command line tool to create an event source.

Do you know the differences between an event log, an event source, and an event? I seriously recommend looking those terms up.

Dave Kreskowiak 5-May-16 9:47am View
   
No, we are not writing your code for you. It seems as though you copied your homework assignment and pasted it as a question. We're not here to do your homework for you.
Dave Kreskowiak 5-May-16 7:56am View
   
Cool. I have all versions of .NET installed so it didn't even occur to me that could be the problem.
Dave Kreskowiak 4-May-16 14:36pm View
   
Why didn't you say "mobile authenticator" before?

You're really not going to find an example of doing this anywhere on the web. The entire point behind it is security and being tamper-proof. Those two things are incredibly hard to pull off.

You'd be better off getting a commerical product that does this, like Google Authenticator, and integrating that into your website.

There's even an article here on CP about it -> Implementing Two Factor Authentication in ASP.NET MVC with Google Authenticator[^]
Dave Kreskowiak 4-May-16 14:11pm View
   
No, it's just this one time.
Dave Kreskowiak 4-May-16 11:32am View
   
Thanks. Someone with equal weight voted me a one within two minutes of my post. WTF?
Dave Kreskowiak 4-May-16 10:52am View
   
In that case, I have no idea what's wrong. I would try uninstalling PowerShell and reinstalling it from the 4.0.
Dave Kreskowiak 4-May-16 10:41am View
   
Very odd. What comes back if you type $PSVersionTable.PSVersion
at the PowerShell command prompt?
Dave Kreskowiak 4-May-16 9:58am View
   
What part of "bigger than the server allows" do you not understand?

This has nothing to do with your Outlook settings. This has to do with the limitations imposed by the server your Outlook is connecting to. Unless you control that server you have no control over changing this limitation.
Dave Kreskowiak 2-May-16 11:43am View
   
Why? For what purpose?

You don't normally add a button to the WebBrowser control so this request is a bit strange.
Dave Kreskowiak 2-May-16 11:36am View
   
In your Catch block, you're just eating an exceptions and not reporting it. It would appear as though your code is throwing an exception that would help you troubleshoot the problem, but you'll never know it because you're not logging the exception anywhere.
Dave Kreskowiak 1-May-16 21:07pm View
   
How do I answer that when I have no idea what you're code is supposed to be doing, querying, or return?
Dave Kreskowiak 1-May-16 17:59pm View
   
Think about this for a second. You've got a GetAll() method that is supposed to return an list of "CompanyTbl", whatever that is. It doesn't sound like a proper Company item class to me.

Now, in there, you've got a call to a method that returns a SINGLE Id of something.

Do you see the problem yet?
Dave Kreskowiak 1-May-16 16:47pm View
   
No, it's not. SelectCompany() is a method in whatever context class db refers to. That method may execute a stored procedure on SQL server, but the code you've posted doesn't show how that's being done or what SelectCompany() returns.
Dave Kreskowiak 1-May-16 12:01pm View
   
It was your statement that isn't helpful, not ppolymorphe's or mine.
Dave Kreskowiak 1-May-16 11:42am View
   
bullsh*t it's not helpful. You either learn to use the debugger or you quit coding.

The debugger is there to teach you how your code works, what it's actually doing. It's there to debug YOU and your understanding of the code, which is EXACTLY what this question is about.
Dave Kreskowiak 1-May-16 11:34am View
   
Not enough information to answer.

But, according to the error message, whatever SelectCompany() is doing, it's not returning a dataset, but an integer.
Dave Kreskowiak 1-May-16 11:14am View
   
I don't give a sh*t.

You system IS infected. Virus scanners do NOT detect every threat out there. They do what's called "enumerating badness". They can only identify stuff that they know about. They CAN'T identify anything that they don't already know about. Now, if your system gets infected BEFORE the virus tags are generated by Symantec, you're screwed! The virus is defending itself against detection.

I already told you what your old hope is.

Get to work!
Dave Kreskowiak 1-May-16 11:12am View
   
Yes I did. You CAN'T stop it.
Dave Kreskowiak 1-May-16 11:12am View
   
No, YOU.
Dave Kreskowiak 1-May-16 11:10am View
   
If your server doesn't have access to the internet, yes.
Dave Kreskowiak 30-Apr-16 23:33pm View
   
Yeah, I'm done with him.
Dave Kreskowiak 30-Apr-16 13:55pm View
   
I already told you what to do with this.
Dave Kreskowiak 30-Apr-16 13:54pm View
   
I already told you.
Dave Kreskowiak 30-Apr-16 13:54pm View
   
I already told you.
Dave Kreskowiak 30-Apr-16 13:54pm View
   
Did you WIPE the hard drive? Without doing that, all you did was reinstall Windows onto an infected drive and reinfected your newly installed Windows.
Dave Kreskowiak 30-Apr-16 13:53pm View
   
You can't.
Dave Kreskowiak 30-Apr-16 13:05pm View
   
Whatever the hell "Eset" is.

YOUR MACHINE IS INFECTED!!! THERE IS NO DENYING THIS. I DO NOT CARE WHAT ANTIVIRUS YOU HAVE INSTALLED! IT FAILED TO DETECT THIS or you did something stupid to authorize the installation of the ransomware. Don't even bother trying to uninstall it. It's going to defend itself from your attempts to clean it up and get rid of it.

Your only hope is to get a utility, NOT downloaded by your machine!, WIPE the hard drive and reinstall Windows from media.

DO NOT RESTORE any backup you may have of this machine because you might just be restoring the virus you're already infected with.
Dave Kreskowiak 30-Apr-16 10:16am View
   
I don't have a clue. I've never seen the hardware you're using. What I told you is generic for all micros, not just yours.
Dave Kreskowiak 30-Apr-16 10:07am View
   
How can anyone answer this? You haven't said ANYTHING at all about what these "networks" are, what protocol are the servers using (HTTP, FTP, SMB, ...), are these data in files?, how big are these files?, are you pulling these datas into a storage location local to the code that's running? Do these different network locations require different credentials to get to if they are secured?

We have nothing at all to work with to help you with this problem.
Dave Kreskowiak 30-Apr-16 10:00am View
   
Think about this. You've posted nothing but an error message and none of the code that is throwing it. How is anyone going to give you any useful information without seeing the code you wrote?

There is just about never a single reason any particular error is thrown. There is usually many different causes.
Dave Kreskowiak 30-Apr-16 9:56am View
   
You're answering a 2 year old question. I don't think the OP is looking for an answer anymore.
Dave Kreskowiak 30-Apr-16 9:21am View
   
Your machine is infected with some kind of Ransomware.

What you're doing here with this command has absolutely nothing to do with it.
Dave Kreskowiak 30-Apr-16 9:20am View
   
Not that's any good.
Dave Kreskowiak 29-Apr-16 23:19pm View
   
Yeah, I've been there. I consider it non-functional it was so bad.
Dave Kreskowiak 29-Apr-16 17:52pm View
   
And the error would be......???? Hint: The most important piece of information you can have to troubleshoot the problem.
Dave Kreskowiak 29-Apr-16 15:43pm View
   
Dave Kreskowiak 29-Apr-16 15:12pm View
   
That's because the name is CASE SENSITIVE!!!!

The correct name is "NewLinkHere", NOT "newlinkhere". YES it matters!


You own Richard an apology.
Dave Kreskowiak 29-Apr-16 15:04pm View
   
Which command are you pasting into Start/Run??

1: Process.Start("rundll32.exe", Environment.ExpandEnvironmentVariables("appwiz.cpl,NewLinkHere %USERPROFILE%\Desktop"))

or

2: rundll32.exe appwiz.cpl,NewLinkHere %USERPROFILE%\Desktop

?????????????????????????????
Dave Kreskowiak 28-Apr-16 9:37am View
   
There are no other templates. There are, however, FAR better tools for creating MSI installers.

Dave Kreskowiak 27-Apr-16 16:24pm View
   
You posted this as a Solution to your own question.
Dave Kreskowiak 27-Apr-16 9:49am View
   
The array itself is, the content is not, unless it's a string of course. :)
Dave Kreskowiak 26-Apr-16 8:11am View
   
The code you posted is boilerplate stuff and not where the problem is. We know nothing about the database and the SQL statements you're executing.

Also, a logical "read" is NOT an execution of a query. You can have lots of read operations on a single query because of the number of records you're returning.
Dave Kreskowiak 25-Apr-16 15:34pm View
   
Why are you creating a service to do the clean up? Just write a normal Console application that you setup in Windows Task Scheduler that runs the job once a day.
Dave Kreskowiak 25-Apr-16 15:32pm View
   
Uhhhh I hate to tell you this but saving an image of a fingerprint for later verification does you no good. You're not going to get a match unless the next scan of the finger print is exactly oriented the way the enrollment image was saved. By that, I mean your next print image has to be placed EXACTLY in the same place and at the EXACT same angle and with the EXACT same pressure on the scanner as the enrollment image.

I suggest you do some research on how fingerprints are recorded and compared. It's not by saving bitmap images.
Dave Kreskowiak 25-Apr-16 10:12am View
   
The "Setup and Deployment templates" are not missing. They were replaced, starting in VS 2012, with InstallShield LE.
Dave Kreskowiak 23-Apr-16 16:11pm View
   
Did you want to tell us on which line this message occurs or do we just guess at it?
Dave Kreskowiak 22-Apr-16 14:53pm View
   
No. The server should NEVER contact a client machine for anything.

To do it from a web page on the client browser, you'd have to write a Windows application that gets installed on the client and talks to the device over the serial port. This software would also expose a web server that the javascript in your web page could use to talk to the application and communicate with the device. This web server would be an intermediary between the two.
Dave Kreskowiak 21-Apr-16 12:12pm View
   
Come on. Read the error and start thinking.

It says you're trying to inert a new record into the table with the same primary key value that another record in the table is already using.

Why are you even letting users enter a OrderId in the first place?
Dave Kreskowiak 21-Apr-16 9:37am View
   
I misread the post, sorry...

I think you mean "sorted", not "shorted".
Why are you putting everything in a dictionary only to dump it into a database?

Dave Kreskowiak 20-Apr-16 23:45pm View
   
You have to define exactly what you mean by "proper case". Without that, it's pointless to write any code to target that. Also, YOU are going to write the code, not us.
Dave Kreskowiak 20-Apr-16 18:51pm View
   
YES you have to write the code for it! nr_procs is just a variable you declared as an integer. How the hell is the system supposed to know that you want the number of processes in that variable???

I've never even seen a minix machine, so you're going to have to dig through Google to get some sense of what the code is going to look like. I'd start by Googling for "minix get list of processes".

Dave Kreskowiak 20-Apr-16 18:18pm View
   
OK, so where's your code to get the list of processes? This will be dependent on the O/S you're running the code on.
Dave Kreskowiak 20-Apr-16 16:50pm View
   
You probably have mismatched { } somewhere. There's really no way anyone can tell you where. You have to go through code in the file and make sure every { }, [ ], and ( ) are matched up properly.
Dave Kreskowiak 20-Apr-16 16:43pm View
   
Why couldn't you just setup a job in the SQL Server Agent to run it? No code necessary and it'll run whether or not you're code is running or cannot contact the server for some reason.
Dave Kreskowiak 20-Apr-16 12:52pm View
   
You posted this as an answer to your own question.

File Not Found can also apply to registry keys and values.
Dave Kreskowiak 20-Apr-16 10:25am View
   
You might want to explain what you're really trying to do with this. Your question isn't answerable with the lack of detail you provided.
Dave Kreskowiak 20-Apr-16 10:21am View
   
It's in there. For some reason it's not being rendered.

EDIT: Fixed. The lang attribute in the PRE tag was screwing it up.
Dave Kreskowiak 20-Apr-16 10:19am View
   
You don't.

And don't hijack some other thread to interject your question. Start your own!
Dave Kreskowiak 20-Apr-16 8:29am View
   
Whoever is running the bat file has to be an admin to install a service.
Dave Kreskowiak 19-Apr-16 8:46am View
   
How about asking Digital Locker? They would kind of be the experts on their own site and whether there was even a public API available, now wouldn't they?
Dave Kreskowiak 19-Apr-16 8:26am View
   
True if you do the naive comparison of two DateTime objects which will compare right down to the millisecond. You don't do that. You compare the Date, Hour and Minute properties separately.
Dave Kreskowiak 18-Apr-16 23:45pm View
   
Ummm... WHY are you trying to use Windows Forms stuff in a web application? System.Windows.Forms is not a class but a namespace. What exactly are you trying to do with the classes in this namespace and why?
Dave Kreskowiak 18-Apr-16 23:42pm View
   
The code is a mix of parallel port stuff (has to be a REALLY OLD machine to still have a parallel port) and serial port. This is one messed up project. The hardware he's talking to has to look like something Rube Goldberg put together.
Dave Kreskowiak 18-Apr-16 23:38pm View
   
I changed my answer. My original was not so nice because of a very frustrating situation I was in at the time and I boiled over a bit.
Dave Kreskowiak 18-Apr-16 18:22pm View
   
Being a set of online services pretty much says they are not downloadable.
Dave Kreskowiak 18-Apr-16 17:21pm View
   
I never said it was difficult or easy. All I said was you're getting yourself into a VERY bad habit. Now that you've used a UI control as a data container, you've have tightly bound your code to that control. You can now no longer use this code in any other kind of application, such as a Windows app or a web site or some other app type on Android. It is forever bound to running on one type of Android application you've built. Congratulations.
Dave Kreskowiak 18-Apr-16 12:22pm View
   
There is not enough information to go on. I take it you're ASSUMING something is infected then?
Dave Kreskowiak 18-Apr-16 12:20pm View
   
Then you're going to have to get a hold of the people that wrote the library you're using. I have no idea why it's giving you that error.

The only thing that's suspicious is that you've got a hard-coded path to a file at "localhost:6060/PhpProject2/img/img2.jpg". Unless the server running this code has the EXACT same path to get to it or you didn't deploy the file to that path.

You really shouldn't be using a "localhost" path to get to content. You should be using relative paths that start with "~" and Server.MapPath to get a filepath to content on the server.
Dave Kreskowiak 18-Apr-16 12:15pm View
   
Permission granted! Please, proceed.

Or did you have a question with a problem that you haven't told us about?
Dave Kreskowiak 18-Apr-16 12:07pm View
   
A serial number for a paragraph? There's no such thing! Your question doesn't make any sense at all.

Are you thinking of a bulleted list or a numbered list?
Dave Kreskowiak 17-Apr-16 15:54pm View
   
Google the exception message and start reading.
Dave Kreskowiak 17-Apr-16 11:27am View
   
What's an "IDS"?? What "system" are you talking about?? Are you writing this "system"?
Dave Kreskowiak 16-Apr-16 22:36pm View
   
I've already told you what to do. You're just making it harder on yourself and less performant.
Dave Kreskowiak 16-Apr-16 19:34pm View
   
Without knowing anything about how your form is setup and the code you've written, it's pretty much impossible to tell you anything definitively.

The Anchor property doesn't just "break" on its own. Your code has to do something to screw it up. Are you sure the container you dropped the TextBox on is the Form or did you accidentally drop it on another container, like a Panel or something? Did your code create a new instance of a TextBox and add it to the Form? ... There's a lot of possibilities.
Dave Kreskowiak 16-Apr-16 19:31pm View
   
There is no "pattern" to use at this level. Patterns solve small problems in your code, not something on an application level.

The best "method" to use would be proper software engineering practices. That's not something you're going to learn from a few forum posts and on-line articles.

I get the feeling that you're going to have to learn this stuff by doing it and making a ton of mistakes.
Dave Kreskowiak 16-Apr-16 14:15pm View
   
Help with what? You really haven't said anything about the code you've written and the problem you're having. There's nothing to answer!
Dave Kreskowiak 15-Apr-16 11:40am View
   
There is no "best" solution. There is only what's more appropriate.

You're already doing the job with the code you're posted. Whether or not there is a better way depends on what your exact requirements are, which we know nothing about.
Dave Kreskowiak 14-Apr-16 13:57pm View
   
Yeah, I'm not going to worry about it. It's up to him to figure out how to map his business rules to an appropriate method.
Dave Kreskowiak 14-Apr-16 0:17am View
   
You're going to have to fill in the details. This still isn't enough information.

So does every other PC in the network have drive letters mapped to the shares exposed by your laptop? Is the IIS server hosting this ASP.NET application running on your laptop?
Dave Kreskowiak 13-Apr-16 22:23pm View
   
That doesn't make sense because ASP.NET code runs entirely on the web server and won't have any mapped drives at all.

If you're talking about the mapped drives on the client (browser) you're still out of luck because code running in the web browser (javascript) doesn't have access to the client machines resources, like drives.
Dave Kreskowiak 13-Apr-16 22:00pm View
   
Crap. I feel like crap. Probably why I missed that. I was paying too much attention to how crappy I feel.

Fixed.
Dave Kreskowiak 13-Apr-16 11:04am View
   
You're going to have to ask them how to use it.
Dave Kreskowiak 13-Apr-16 10:36am View
   
ALL files are just an array of bytes. You didn't ask a comprehensible question so there's really nothing more to say on this.
Dave Kreskowiak 13-Apr-16 10:19am View
   
In that case, you're going to have to update your code to log the exception details, somewhere or even show and error page that gives all the details of the exception and any inner exceptions.

Either that or call GoDaddy support and see if they can give you any more information about the error from any sources they may have.

Advertise | Privacy | Mobile
Web02 | 2.8.160530.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid