|
hai ,
how can we create a Password on a folder to prevent from others to access
|
|
|
|
|
Hooking winapi IO function might help.
|
|
|
|
|
hai,
we created(windows application) a folder in server->shared folder ,there we created some .Xml Files in this shared Folder->My folder ->.xml files,but we want to stop the server "user" or "admin" or any user to that server to prevent delete this "My folder " from that server machine.
How can we do this
|
|
|
|
|
I made a web service and when I went to make the tet client I noticed that the Order Class was exposed which was fine with me except that the Order class comes from the BookStoreBLL reference which I guess is making me wonder if the Order class is exposed then why isn't all of the BookStoreBLL class exposed? And how could I expose at least one more item? And why is the Order class showing up? The following is my main code page for my Web Service.
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
using BookStoreBLL;
namespace WebService1
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
OrderedBooksCollection coll;
BooksBLL bll;
UsersBLL userBll;
OrdersBLL orderBll;
[WebMethod]
public Book[] AllBooks()
{
bll = new BooksBLL("C");
return bll.allBooks();
}
[WebMethod]
public ReturnedOrderInfo ExecuteOrder(User u, Order o)
{
ReturnedOrderInfo info = new ReturnedOrderInfo();
info.OrderNumber = 0;
userBll = new UsersBLL("C");
UserRoles role = userBll.verifyUser(u.UserName, u.PW);
if (role == UserRoles.BadPass || role == UserRoles.None || role == UserRoles.NoUsers)
{
info.Status = orderStatus.UnauthorizedUser;
return info;
}
info = orderBll.ProcessOrder(o);
return info;
}
}
}
|
|
|
|
|
Hi,
I think this has something to do with the arguments the method ExecuteOrder is expecting. Since the method needs an object from type "order" your client has to pass it. So Order is exposed. Also the ReturnedOrderInfo, Book and User classes should be exposed. These are not really the classes you have in your BooksBLL. The service does nothing else than mapping the XML to objects from the expected type. The client only has stubs that generate these XML. You will see that your Order-object at the client doesn't expose the methods you declared in the class on your server.
Regards
Sebastian
|
|
|
|
|
I am using Web browser control in C#, in which we are loading FCK editor (a third-party HTML Editor tool). There are some JavaScript function in the FCK editor tool, which we are using to intialize, set and get data from the editor. While running our application in Windows XP /IE 6.0 & IE 7.0 it works fine but we are getting security block while running in Windows Vista machine with IE 7.0. We searched solution for the problem in web, we found a solution to change setting in Internet options, that is, by checking the option "Allow active content to run in files on My Computer" under Advanced tab. We tried this setting changes but still we cannot able to resolve the issue. Can anybody throw light on my issue?
The security block message that we are getting is as follows...
"To help protect your security, your web browser has restricted this file from showing active content that could access your computer."
I'm using:
Visual Studio 2005
.NET Framework 2.0
Syed
Zoniac Software P Ltd
Chennai
|
|
|
|
|
Hello everybody.
My project is C# project and I want to make an array of function.Is this possible and how to make it?
Thanks in advance
|
|
|
|
|
Using Delegates and the DynamicInvoke method...
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
You can't have array of functions. You can have array of delegates referring to function. It would be like
delegate void Function();
Function[] functions = { Function1 , Function2 , Function3 .. };
functions[0]();
|
|
|
|
|
can you write me a sample how to define
Function1 , Function2 , Function3
|
|
|
|
|
Take a look at this link[^].
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Heh, you could write some fun code with that:
FunctionDelegate[] functions = null;
functions = new FunctionDelegate[]{
delegate(){
functions[0]();
}
};
functions[0]();
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
If you don't ask questions the answers won't stand in your way.
Most of this sig is for Google, not ego.
|
|
|
|
|
Yes, but a List<Delegate> might be better.
|
|
|
|
|
If I have multiple vendors which I make classes to get data for vendors X,Y, and Z, and I ask for data N,M,and O. How can I dynamically change the method so that I may continually add vendors without having to constantly change the code in other parts of my program. I want to be able to choose the vendor and
data from a ComboBox, so when I make the choice it will change the method as follows. If not this way is there another way I can accomplish the same goal.
GetMfromVendorY()
GetNfromVendorX()
GetOfromVendorY()
GetMfromVendorZ()
Thanks in advance,
Michael
|
|
|
|
|
Instead of having different methods why don't you use Generics..I mean have a common method which takes a Generic param i.e. the Vendor type you want to access...
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Not sure I got your question correctly.
You define a interface something like
interface IVendor
{
M GetM();
N GetN();
O GetO();
} Now each of your vendor classes has to implement this interface. Maintain a configuration file where class names of all these vendors are stored. According to the dropdown value, get the relevant class name from configuration and invoke it using reflection. You can use Activator.CreateInstance[^] for this. Cast this object as IVendor and return. Now you can call required methods on this.
This will help you to add new vendors without recompiling the program.
|
|
|
|
|
Yeah, that's quite similar to the strategy pattern[^], which I would use in this case.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
hi everyone
i'm trying to run one of the microsoft samples under the category service behaviors --> security. i did the basic configuration for the samples, but this one needs further settings and i have no idea how it can be done. below is the link to the sample description:
http://msdn.microsoft.com/en-us/library/aa354509(VS.85).aspx
i need step by step details on whatever i should do to get it to run, i really appreciate your answers.
--- Thanks
|
|
|
|
|
Hi,
did you pay attention to all of the settings described in the sample? Do you get an error message when you try to run the sample? What is the error message saying?
Regards
Sebastian
|
|
|
|
|
i did, the problem is i don't get what i should do with the setup.bat file and i need more detail guide. it throws the following exception in console window:
Exception: the requested service , 'http://localhost/servicemodelsample/service.svc' could not be activated.
--- Thanks
|
|
|
|
|
Since the sample has something to do with security I assume it is a security issue. Have a look to the Windows Event Viewer, there should be an exact description of the error. Post this error here, so that we can have a look at.
Found here:
http://msdn.microsoft.com/en-us/library/aa395204.aspx[^]
|
|
|
|
|
Hello. Did anyone try to change his mac address,and achieve it? I can change it by using network adapter properties. And when looking its value with ipconfig/all command, it shows the value that i changed. But in this case it dosent connect any wireless networks. Later i learned that some registry keys are hold by windows. that is to say it was not enough to change the value from properties screen, also should have been changed registry. I found a program written with c++ but it didnt work again. Now, did anyone use that kind of program or write in c#. Or is it impossible?
|
|
|
|
|
possible[^]
I dont think there will be any problems developing that kind of application
|
|
|
|
|
i couldnt find any solution. i think this impossible because of being related with hardware
|
|
|
|