|
It was really a good one. And the citation suited very well to what Ashfield noticed
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hello Everybody,
All I am trying to do is to call the wcf service which is hosted using windows service in another machine. The server certificate I have is generated using the makecert following the article http://www.codeplex.com/WCFSecurity/Wiki/View.aspx?title=How%20To%20-%20Create%20and%20Install%20Temporary%20Certificates%20in%20WCF%20for%20Message%20Security%20During%20Development&referringTitle=How%20To%20-%20Use%20Certificate%20Authentication%20and%20Message%20Security%20in%20WCF%20calling%20from%20Windows%20Forms
I installed this certificate in trusted publishers rather than in Personal. I am able to call the service in the same(where the service is hosted) machine. When I copy the client to another machine and try calling this service, it returns this exception.
{"The remote server returned an unexpected response: (407) Proxy Authentication Required."}
this is how i referenced the webservice:
ServiceReference1.ServiceClient GetTablesSVC = new ServiceClient();
this is where it throws the exception
ds = GetTablesSVC.GetTablesToBeUpdated();
Any quick help is greatly appreciated
|
|
|
|
|
|
does it matter if i asked for help twice,i'm that desperate...i got deadlines,and i can't find a solution to my problem.
|
|
|
|
|
DotNetCoderJunior wrote: does it matter if i asked for help twice
Yes, its considered rude.
DotNetCoderJunior wrote: i'm that desperate...i got deadlines
Then pay for support rather than getting it free from volunteers.
|
|
|
|
|
Yes it does. Let me explain.
People here only read the forums they know stuff about. If you post in multiple forums, 2 different people may answer your question. This means one of those people has wasted their time giving you an answer, because someone else had already answered it but they didn't realise. Or if they do notice you've posted in multiple places, they have to waste their time like Pete has linking your posts together.
People here answer questions for free, so you should do your utmost not to waste their time. It is polite to post your question in just 1 forum.
The fact that your desperate and your problem is urgent doesn't make any difference. If you need an answer urgently you should phone MS tech support and pay for it. If you want an answer freely, bide your time and let someone answer it at their own pace when it's convenient for them.
Simon
|
|
|
|
|
Thanx for explaining,i appologise, i didn't at all intend on coming across as rude...i'm fairly new to development,i just wanted a little help from you experts,if i could afford to pay for suppoit i would,but unfortunatlely my finances does not allow me to do so...
|
|
|
|
|
i removed the other post,sorry again...
|
|
|
|
|
|
DotNetCoderJunior wrote: does it matter if i asked for help twice
Yes, because it irritates people.
DotNetCoderJunior wrote: i'm that desperate...i got deadlines,and i can't find a solution to my problem
Then, you have one option, start looking for a different line of work.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hi Guys,
I've got an windows forms application developed with c#.
My admin just rang me up, as he installed the application testwise on one of our client pc's, that he explicitly has to give the user the permission to write into the application directory.
the application is installed under c:\progam files\applicationDirectory. The application is using a xml-file to read and save application data.
my question is - what can I do to set the permissions correctly on pc's where the user is not neccessarily an administrator. (and I would like to leave the data xml within the applications directory, if possible...)
any suggestions are very welcome
thanks
piratenwichtl
|
|
|
|
|
You shouldn't store data in the application's folder. You should do that in the "special folder" where special permissions shouldn't be required. Here's some code that works on XP and Vista (apologies if it requires scrolling on your screen):
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace MyLib
{
public class Utility
{
public static string CreateAppDataFolder(string folderName)
{
string appDataPath = "";
string dataFilePath = "";
folderName = folderName.Trim();
if (folderName != "")
{
try
{
appDataPath = System.Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
}
catch (Exception ex)
{
throw ex;
}
if (folderName.Contains("\\"))
{
string[] path = folderName.Split('\\');
int folderCount = 0;
int folderIndex = -1;
for (int i = 0; i < path.Length; i++)
{
string folder = path[i];
if (folder != "")
{
if (folderIndex == -1)
{
folderIndex = i;
}
folderCount++;
}
}
if (folderCount != 1)
{
throw new Exception("Invalid folder name specified (this function only creates the root app data folder for the application).");
}
folderName = path[folderIndex];
}
}
if (folderName == "")
{
throw new Exception("Processed folder name resulted in an empty string.");
}
try
{
dataFilePath = System.IO.Path.Combine(appDataPath, folderName);
if (!Directory.Exists(dataFilePath))
{
Directory.CreateDirectory(dataFilePath);
}
}
catch (Exception ex)
{
throw ex;
}
return dataFilePath;
}
}
}
using MyLib;
string dataFolder = Utility.CreateAppDataFolder("MyAppFolder");
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
thanks guys for your answers.
I will have a look into each suggestion.
but i probably dont get around playing with the user permission, because the software is doing a self-update as well for example - means, the software needs the rights to write into the application folder to perform all the action neccessary to update the application.
I see microsofts idea of using these user-directories for storing user data belonging to the application - but I dont like it. I would like to have everything belonging to the application in one single directory.
but thanks anyway
cheers
piratenwichtl
|
|
|
|
|
|
Hi guys,
any idea to display image in webpage directly from database (image control need url) i want to display it without url is it possible? or any other way to do this?
|
|
|
|
|
Aside from the fact you have posted this question in the wrong place (it should be in the ASP.NET forum[^]), you have already received the answer to this question from Guffa here[^]
He said: "you need a proxy page that gets the image data from the database and writes it to the response stream, and you use the url of the proxy page as ImageUrl".
Simon
|
|
|
|
|
Stop asking the same question again and again. Start reading and exploring the answers that were given to you. That's the way to learn programming.
|
|
|
|
|
Hi,
Iam creating picture box dynamically but iam getting this error,
CODE:
PictureBox pb = new PictureBox();
Form.Controls.Add(pb); //Error is in this line//
The error comment is:
The best overloaded method match for 'System.Web.UI.ControlCollection.Add(System.Web.UI.Control)' has some invalid arguments.
|
|
|
|
|
You can't put windows controls in a web page.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Then any idea to display image in webpage directly from database (image control need url) i want to display without url is it possible?
|
|
|
|
|
No, that is not possible. The browser requests the image separately from the page, so it needs an url to request it from.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
You need to set up a proxy page, which reads the image data from the database and writes it to the output stream. Then you set the ImageUrl to the url of your proxy page.
|
|
|
|
|
there are several options
- if you can take out the files from the database, you can set them in a directory and save the paths instead.
- if that's not an option, stream the file to a tmp directory and set the url to that path, when the session expires you delete the files used within that session (you'll need a good naming convention...)
hope this helps.
|
|
|
|
|
You forgot the solution that doesnt require writing the data to disk, which the OP has now been given >3 times.
|
|
|
|