Click here to Skip to main content
14,929,068 members

Comments by Guirec (Top 68 by date)

Guirec 25-Jul-13 3:40am View
   
All of that becomes a true non-sense.... You were talking about http authentication and now you are bringing your problem down to sql server...


I suggest you take a moment out of your code and try to read articles about http authentication and its different mechanisms. A bit of theorical knowledge on this will help you narrow down your problem.

Personally, I can not help you much more on this... good luck buddy.
Guirec 25-Jul-13 2:32am View
   
look at my answer, it states if you are using "basic authentication" that will work.
If it is not working it means your server is not using "basic auth" but most probably "Windows authentication" and then there is nothing you can do by simply calling a url like that...


Guirec 25-Jul-13 2:20am View
   
you can't do that... http authentication is not wihthin a form. it adds information to the headers of the http request.

That said : what are you trying to do?? Call the thing manually from the webbrowser or do it programmatically ?

Guirec 25-Jul-13 2:02am View
   
encode your password not the @ in the url...

http://encodedusername:encodedpassword@192.168.3.161/ReportServer
Guirec 24-Jul-13 23:46pm View
   
so you should html encode your password prior to the call..
Guirec 24-Jul-13 23:45pm View
   
Use a List... that is your best option here.
Guirec 24-Jul-13 23:44pm View
   
Vicious solution :)
You are right that is doing the job but I would still not consider that as a viable answer : apart if you want to appear in coding horror's hall of fame :)
Guirec 24-Jul-13 5:45am View
   
Yes you first problem is fixed... that was for sure.
Now as I told your query is pretty messy and I am not surprised it is not bringing the result you expect.

If you need some help regarding this then you'd better describe your tables and the expected output...

Statements like : "give a result set and a single row for each center_id" does not mean much. In SQL a select always return a result set and nothing else. a result set period.

I suggest you open a second question.
Guirec 24-Jul-13 5:38am View
   
If on -- client -- side the uploaded document is located at "D:/Document.xls" then every standard browser will send you back that path without any error.
So whether something in your question is not making sense or your clients are using self-made browsers :)
Guirec 24-Jul-13 5:23am View
   
no you can't... that answer is misleading
Guirec 24-Jul-13 4:36am View
   
I understood it is not notepad you want to launch in the end and you just use that as an example. That is the same for my answer... Replace Notepad with CutomExe and the answer remains exactly the same.

Maybe your design could be changed to an alternative solution...
it is much more common practice to see rich client applications (winforms, wpf, gtk, ...) embedding a browser control rahter than trying to perform rich client things inside the browser (this ususally leads to too many incompatibilities and security issues).

Guirec 24-Jul-13 4:30am View
   
Hi Johnny J Don't lose your time answering these guys. You can report them using the red flag.
Guirec 12-Jul-13 5:43am View
   
If you start debugging on your test server then it is not a test server anymore but a development server.

You'd rather implement logging and tracing.
Guirec 20-May-13 5:14am View
   
your question can not be answered: Cache, cookies and ViewState are 3 completely different things.
If you want to persist data on your server side and retrieve it in a fast manner then caching is your solution.
Guirec 20-May-13 3:19am View
   
the method is probably returning null because the value of your xpath param is not a one which returns any result...
If you want to get some result you should use :

GetLinkOfNews("//a");

is this what you are doing?
Guirec 20-May-13 3:15am View
   
then you don't need to transform into a datatable...
you just have to bind your result to the listBox.
Guirec 14-Feb-13 2:08am View
   
what do you mean by "relevant" ?

if you mean equals you just can do : text.Contains(searchedThing);
Guirec 13-Feb-13 7:51am View
   
Deleted
Maybe is missing...
Guirec 13-Feb-13 3:23am View
   
Client side? javascript ? jquery?
Server side? .net? php?
Guirec 13-Feb-13 2:30am View
   
What is the sql type of afa.address ?
Guirec 13-Feb-13 1:34am View
   
do you have the html part?
Guirec 13-Feb-13 1:28am View
   
who's downvoting this?? It is a pretty straightforward answere and which works for sure...
Guirec 13-Feb-13 1:24am View
   
Your problem is a bit more complex than it looks.
The simple way is to store your filenames in the user session object and then when the user submit the form you get all the filenames but that is a pretty poor design which can have a lot of side effects (eg: if the user has 2 browsers open to upload files for 2 different 'things')

The proper way to handle it is to store the filenames in a hidden field of the page. You can do so by registering a javascript function to the OnClientUploadComplete attribute of your FileUploader control.
Guirec 13-Feb-13 1:17am View
   
if your viewbag contains the imageName are you sure it does not contain its extension as well? If yes you have to remove the +".jpg" part in your model.
Guirec 13-Feb-13 1:14am View
   
In my opinion there is no contest: I vote for MVC.
The fundamentals of a protocol agnostic service mechanism (WCF) is very interesting in theroy but in reality it is a pain in the neck (debugging and configuration) for almost every user. Many architecs are reverting from it now in favor of home made API or technology like WebAPI.
MVC will serve you more on your resume.
Guirec 13-Feb-13 0:57am View
   
ok so don't transform it to a string represnetation but to a Decimal one.
Guirec 13-Feb-13 0:07am View
   
ah ok, sorry.
To solve your issue I suggest you add an additional property to your source object. This new property (let's say you call it MoneycolumConverted) would be the ToString() value (or whatever string representation...) of your Money property then you could write your filter like :

dt.DefaultView.RowFilter = "MoneycolumConverted = 12345.67"

should work...
Guirec 12-Feb-13 23:14pm View
   
Did you try with '==' instead of '=' ?
Guirec 12-Feb-13 23:12pm View
   
Message to the serial downvoter.... My answer was pretty valid before "Member 7993229" edited his question...
Guirec 12-Feb-13 22:47pm View
   
Could also be that you are behind a proxy. No problem within browser but you have to set the proxy details inside the code as well (or in the System.Net part of your web.config). Check here : http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx
Guirec 12-Feb-13 22:43pm View
   
does the account (user) running the IIS process has any right on that directory? On your local mahine you are probably admin so it definitely works.
Guirec 12-Feb-13 17:36pm View
   
diffgram.getProperty("NewDataSet") ;

diffgram must be null... I don't see any "diffgram" prooerty in your wsdl either..
Guirec 12-Feb-13 8:46am View
   
sql engines are usually very good at interpreting....
Guirec 12-Feb-13 6:12am View
   
I suppose you want to open communication with an external device using a serial port. Right?
Guirec 12-Feb-13 6:06am View
   
Do you suggest we count the lines ?
Guirec 12-Feb-13 5:46am View
   
Your question is a bit unclear to me. Could you be more specific on your goals and also tell why reflection is not suitable? If you want to loa a 3rd party dll at runtime I guess you don't have much choice...
Guirec 12-Feb-13 0:41am View
   
Please complete your question:
do you want to completely get rid of the stored procedure and then do a rewrite in C# ? or do you want to make a call to your procedure from C#?
Guirec 12-Feb-13 0:39am View
   
Do you have the excel manual as a file already?
Guirec 12-Feb-13 0:37am View
   
You should try to save your file to disk before giving it to the SmtpClient class.
1. you can make sure your file is actually not empty before you send
2. when sending the fule it is most likely that the HttpResponse (container for your input stream) has been disposed already.
Guirec 11-Feb-13 5:55am View
   
simply replace 'Response.OutputStream' by a variable you will declare as new MemoryStream();
then you can uset the newly created stream to save the file to disk and render it in a windows form.
Guirec 11-Feb-13 5:47am View
   
it is you File.OpenRead(blobfilePath.Replace("https","http")); which does not support URI formats.
To open your azure file you should do WebRequest.Create as well if it is distant or File.OpenRead but then with a path not a url.
Guirec 11-Feb-13 5:30am View
   
Just an idea... Create a user in the destination machine with the same login as the one who was 'owning' the backed-up database...
Guirec 31-Oct-12 12:32pm View
   
Good to you.
Guirec 31-Oct-12 12:31pm View
   
Sorry mate but your question started with "i want to put a lot of items in the toolstrip about 150 item ".
if that's not what your aimming for then click the "Improve question" link and modify your question. We are not psychics.
Guirec 31-Oct-12 4:09am View
   
In your case the proper way of doing it should have been:

var bytesArray = System.IO.File.ReadAllBytes(filenpath);
var decodedString = ASCIIEncoding.ASCII.GetString(bytesArray);

But I'm not even sure that's what you are aiming at given the code you announced as being a solution.
Guirec 31-Oct-12 4:05am View
   
This post is a pure delight!
"Text into Key" means nothing my friend....
What were you looking for? a function to decode a set of ascii characters into a string? Why don't you ask for that then?
Guirec 31-Oct-12 1:53am View
   
Oooohh dude! the more you explain the less understandable it gets.
Guirec 30-Oct-12 12:38pm View
   
I am wondering how you guys do... I mean you, OG and all others dedicate people! I am happy to help either but there are times when we are not talking about helping!
Guirec 30-Oct-12 12:14pm View
   
There is really few chances your code is raising an exception with a catch{ /* DO NOTHING */}
Guirec 30-Oct-12 12:11pm View
   
Is the user (windows account) trusted to access SQL Server?
Guirec 30-Oct-12 11:43am View
   
Ooooch!
Guirec 29-Oct-12 11:51am View
   
It was originally intended to deal with any alphabet based written language.
Guirec 4-Oct-12 6:32am View
   
your second select should return values for columns paid_amt, payment_mode, etc... (even if null values)
Guirec 4-Oct-12 6:26am View
   
that's most probably where your mismatch come from I suppose.
Guirec 4-Oct-12 3:36am View
   
What do you mean by you are unable?
Don't you even know how to start or do you already have some code producing an error?
Guirec 4-Oct-12 3:35am View
   
Whether your function is not called at all for the last line, whether your "oldValue" is not in the line... Your function should work fine. Problem must be external.
Guirec 4-Oct-12 3:26am View
   
Is your first database setup with AutoIncrement on primary key ? If yes check that second one has the same setup.
Guirec 3-Oct-12 10:01am View
   
But what are you trying to achieve?
You retrieve a list of entities from db
You enumerate the list a first time. In that enumeration you (in a weird way) delete the object from the entities set.
Then you save : at that point your table should be empty.
You enumerate the list a second time. In this new enumeration you create a copy of the object to add it again to your table.

In the end your method is just doing nothing but consuming system resource.... I mean I don't see the point in removing all records of a table and recreate them at identical.
Guirec 3-Oct-12 9:49am View
   
I guess you understand the issue the same way as we are when reading the exception...
Guirec 3-Oct-12 9:08am View
   
When you look at the generated source (before you click the button) do you have 3 <td> in per row?
Guirec 3-Oct-12 8:46am View
   
What is your intent? Do you want to prevent people being able to read your source code? If yes, you need an obfuscation tool. Otherwise please rephrase your question.
Guirec 3-Oct-12 8:40am View
   
If I understand correctly you have some sql which makes usage of the "print" function and you want to get the output string appearing on a web page. Right?
if Yes then there is no direct way. You have to modify the sql so that you create a variable which is the concatenation of what you are printing and then use that variable as an output command of your ado.net query.
Guirec 3-Oct-12 8:33am View
   
It is actually not stripping the html off... but it uses the "plain text" flavor of the Clipboard while Word is using the "rich text" flavor...
If you want to strip html tags you can do this in c# using a regular expression. Something like:


public static string RemoveTags(string html)
{
return Regex.Replace(html, "<.*?>", string.Empty);
}
Guirec 2-Oct-12 22:27pm View
   
I don't know who downvoted the solution to 1 but some explanations would probably make sense :)
Guirec 23-Apr-12 20:15pm View
   
I have to tell your sp is a bit 'unreadable' but as far as I see :
1. your cursors usage seems to be correct
2. I don't think you need cursors at all. You should be able to do the same job with some standard insert/updates clause. You just need to insert/update based on joins and where clauses.

in your cursor's loop you can use commands like :
print 'I am getting there'

You can then trace execution.
Guirec 23-Apr-12 20:09pm View
   
This will affect security but give it a try to check if your problem comes from there. You can change that afterwards if issue sits there.
You have to be admin of IIS for that. Are you?
Guirec 23-Apr-12 7:14am View
   
Nothing related to cursor...
You explicitely said sql server not to show how many records are affected.
Comment the line: SET NOCOUNT ON
Guirec 23-Apr-12 7:04am View
   
What credentials is your XMLDownloadManager using when getting the stream (see stacktrace) ?
I would say you have an error while reading rather than when writing. Did you try to enable anonymous access in IIS?