|
|
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.
|
|
|
|
|
I have a design problem here.
in the BIL there are some classes that represent business entities
each of this class is static. and they all have mostly the same (static) members :
- some info methods like give the pk for that entity
- perform some actions on it: search for that specific business entity.
- and so on
I want to enforce that some methods are implemented on each static class.
how can I do it ? note that interfaces don't work here since it is a static class
maybe the design is wrong here, better alternatives ?
<< Nearly all men can stand adversity, but if you want to test a man's character, give him power. >>
|
|
|
|
|
No, unfortunately, static classes must derive from Object and nothing else, and neither interfaces or abstract classes can be static anyway.
It's hard to comment on your design without seeing the whole thing, but I would suggest that yes, to have static classes representing business entities is a bit of a strange design.
Again, it's hard to suggest alternatives without seeing everything you are trying to do, but a pretty standard way is to have a bunch of business objects that define your business entities, these can then be created 1 for each entity and store all the values, and can possibly inherit from a base entity object.
Simon
|
|
|
|