|
Hi all!
I've a slight problem bugging me for some time now and was wondering what you think to be the best solution:
In the installation package (.msi created from a setup project in VS2003) of my app I'll have to perform some custom actions after the installation has finished. For example, modifying config files to reflect user input during installation.
This is done in a custom action on install. The custom action itself is an installer class written in C#.
So far, so good. It works fine when you run the setup from a CD or a local drive, but often the application isn't installed on a single machine only, but several machines in a network.
Now when you put the .msi on a network folder and run it from there the custom action usually chokes because of security settings in .NET.
When run from a network location, the custom action assembly doesn't have the neccessary access rights for local files and the registry.
So you either have to copy the installation package to a local drive or adjust .NET security settings for your network (and, if you want to run the installation from an UNC path, even for your Internet zone!).
What's the best way to deal with this?
Re-write the custom action classes in unmanaged code?
Modify .NET security settings during installation somehow?
Any other way?
Thanks in advance for your feedback...
mav
P.S.: Another point to consider is when I want to include the installation of .NET framework in my setup, then there's no way to manually adjust security settings before the installation of my app....
|
|
|
|
|
Hi,
I am struggling in using dataset or traditional dataReader in ADO.Net.
It seems to me that if I use the dataset (direct bind it to UI), then the dataset will replace the object model layer, so it seems only good for simple application development without much object model logic.
If I insert a object layer
above the dataset, then it seems no difference from the traditional
approach by using DataReader with SQL query. Then what is the goodness
of dataset ?
And if I use dataset, the cached data by read/write in the dataset will be lost if the application hang, so the cached data by read/write should be restricted within the scope of one transaction.
Are all my perceptions on using dataset above right ? Any comments?
Thanks
|
|
|
|
|
Hi All
I am looking for a solution to a problem regarding web service. I want to call a web method of a web service, but I don’t want to use wsdl nor can I generate the proxy class. The scenario is that, in my application user can fill in the web service address and a list of methods with parameters, he wants to execute and I have to get the results.
I have some solution to this problem. Right now i am using WSE to solve this problem. My code is:
Dim env As SoapEnvelope
Dim epr As EndpointReference
Dim client As MyHttpClient
Dim rs As SoapEnvelope
Dim bodyResponse As String
env = New SoapEnvelope
env.Context.Addressing.Action = New Action("http://tempuri.com/TestWebService/MyService/HelloWorld")
env.CreateBody()
env.Body.InnerXml = String.Format("<HelloWorld xmlns=""http://tempuri.com/TestWebService/MyService/"" />")
epr = New EndpointReference(New Uri("http://localhost/TestWebService/MyService.asmx"))
client = New MyHttpClient(epr)
rs = client.Hello_World(env)
bodyResponse = rs.Body.OuterXml
TestReport.Text = bodyResponse
Imports System.Xml
Imports Microsoft.Web.Services2
Imports Microsoft.Web.Services2.Addressing
Imports Microsoft.Web.Services2.Messaging
Imports System.Web
Public Class MyHttpClient
Inherits SoapClient
Public msg As String = String.Empty
Public LoadTesterForm As LoadTesterForm = Nothing
Public Sub New(ByVal dest As EndpointReference)
MyBase.New(dest)
End Sub
<SoapMethod("http://tempuri.com/TestWebService/MyService/HelloWorld")> _
Public Function Hello_World(ByVal envelope As SoapEnvelope) As SoapEnvelope
Dim response As SoapEnvelope
response = MyBase.SendRequestResponse("HelloWorld", envelope)
msg = response.Body.OuterXml
Hello_World = response
End Function
Protected Overrides Sub FilterMessage(ByVal envelope As Microsoft.Web.Services2.SoapEnvelope)
MyBase.FilterMessage(envelope)
End Sub
End Class
I am getting the response back with this code.
Main problem is env.Body.InnerXml, Here we need to specify all the parameters & method name as XML. But i dont have parameter names.
One solution to this problem might be i can generate proxy class at runtime. Can anybody guide me to the right direction?
Thanks a lot
Sumit Domyan
|
|
|
|
|
Can someone point me in the right direction? I have an application shell with a status bar. the shell is going to download assemblies and dynamically creating menu items and toolbar buttons to call the forms from the downloaded assemblies to load up in the shell. How do the downloaded assemblies talk to the shell like write something to the status bar? How should i set the framework up?
misticat
|
|
|
|
|
I have an excel file with 3 sheets.
I want todrag 1 sheet on to my form and do some custom stuff with it.
and links on how or help?
Nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
Hi;
Any suggestions for a Form (not ASP .NET) tree control - I need one that can have check boxes on just some lines and the .NET one is all or nothing.
And a PropertyGrid control? The .NET one has everything I need but when called from my Word Add-In code none of the attributes work.
??? - thanks - dave
|
|
|
|
|
I would override the ownerdraw by extending the Treeview
my half a penny
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
the treeview dont support ownerdraw ... unless your into some heavy api interopping...
Its pretty much easier to create one from scratch than to do the api customdraw stuff on treeviews.
|
|
|
|
|
Igot the MFC treeview confused again.
I forgot that MS did a rush job in the TreeView which is crap anyhow.
Sry,Nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
I want to pick my own colour of the bar instead of those green bars, and i want to have solid colours instead of bars of colour.
|
|
|
|
|
Solid bars are just a property you can set. For the colour, you'll need to draw it yourself.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
they're all options of the progress bar, but if you want a totally customized progress bar, look into owner drawing, or you can write your own class its easy for a progress bar
IM PROUD TO BE A GMAIL;
|
|
|
|
|
The Undefeated wrote:
I want to pick my own colour of the bar instead of those green bars, and i want to have solid colours instead of bars of colour.
There are so many custom progress bar controls here on CP, you should be able to find exactly what you want.
Marc
My website
Latest Articles:
Object Comparer
String Helpers
|
|
|
|
|
Hi all,
I am using a KerberosToken for my signing and encryption when calling a WebMethod on my WebService. It all seemed fine, until our work domain changed, and now we manage our own domain (domain controller).
Everytime I call a WebMethod, I get an exception "The signature or decryption was invalid". I've looked around online, but can't find anything that will help.
I then tried the Kerberos sample that comes with WSE 2.0 SP3. I had the client on a XP SP2 machine, and the WebService on a Win 2003 Server SP1 machine, an I get the same exception even with the Microsoft sample.
Can anyone shed some light on this, as I don't know what to look at next?
Appreciate any help anyone can give, or even a direction I go in to look into it further.
Cheers
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
|
|
|
|
|
I believe most of this was to do with a time difference between the client and the server.
Future tests showed that my software worked with a Kerberos token for 'n' amount of time, and then I would start getting errors. I'm not talking about, constantly working. I mean, closing the application and starting it again, I would still get bizarre Kerberos token errors.
I've therefore stopped using it. It was a good at the start, but too unpredictable.
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
|
|
|
|
|
All,
I am currently working on a program that has a couple different classes that are called from the main windows form. I would like to be able to show the status when one of these classes is called, either by text or by a progress bar. For instance, when a method runs in a class I have called, I would like to be able to say show the name of that method on the windows form. Please forgive me, I am only 6 months into C#!
Eric
|
|
|
|
|
You should probably consider reading about Debug.Assert() or Write(), you could put that wherever you want to note that youre calling a method at runtime, and it will be output to your output window in vs.net
|
|
|
|
|
Hi,
I'm using the AxWebBrowser component in a c# application. Is there a way to disable javascript error messages or at least ensure that they don't pop out in an alert box. i've tinkered with IE setting in the advanced tab to disable notification, and i don't get pop up error messages in IE anymore, but i still get them in my app.
Is there any way to get around this? is there a way to intercept these warnings from code and handle them?
Please, help! Thank you very much.
|
|
|
|
|
To prevent javascript error messages in your mshtml web browser, set the Silent property of your web browser control.
this.axWebBrowser1.Silent = true;
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Conversation With a Muslim
Judah Himango
|
|
|
|
|
Graphics g = this.CreateGraphics();
g.DrawImage(g, new Rectangle(new Point(0,0), new Size(40, 70)), 30, 40, 40, 70, GraphicsUnit.Pixel);
myImage = g.???????
how can i convert a graphic object to Image or how can i draw a graphic object inside an image object?
|
|
|
|
|
Sasuko wrote:
how can i convert a graphic object to Image or how can i draw a graphic object inside an image object?
No, not at all. Thing about Graphics object like about drawing surface.
btw AFAIK Graphics.DrawImage() method doesn't take Graphics object as parameter... Does this compile:
Sasuko wrote:
Graphics g = this.CreateGraphics();
g.DrawImage(g, new Rectangle(new Point(0,0), new Size(40, 70)), 30, 40, 40, 70, GraphicsUnit.Pixel);
myImage = g.???????
?
Use static Graphics.FromImage()[^] to perform drawing into Image object, or pass Image as argument to Graphics.DrawImage method if you want to draw image INTO that Graphics (surface).
Does it help?
David
"Stay Kul And Happy" I.A.
|
|
|
|
|
ok but how can i draw the contain of that g graphic inside an picturebox?
|
|
|
|
|
And you write it *where* with Graphics object?
Usualy you do that like:
Image img = new Image();
using( Graphics g = Graphics.FromImage( img ) )
{
g.DrawLine(...)
..
}
pictureBox1.Image = img;
and all that drawing will be applied to that image. ( I hope )
David
|
|
|
|
|
i use this code:
Image tmp1 = Image.FromFile(path);
Graphics g = Graphics.FromImage(tmp1);
g.DrawImage(tmp1, new Rectangle(new Point(0,0), new Size(40, 70)), 30, 40, 40, 70, GraphicsUnit.Pixel);
pictureBox1.Image = tmp1;
but it draw the perfect original tmp1 image without cutting...
|
|
|
|
|
I am not sure why, but problem is that you use same object as source and destination...
Image tmp1 = Image.FromFile("../../Bitmap1.jpg");
Image img = new Bitmap(100,100);
Rectangle srcRect = new Rectangle(0,0,50,50);
Rectangle destRect = new Rectangle(0,0,20,100);
Graphics g = Graphics.FromImage(img);
pictureBox1.Image = img;
g.DrawImage(tmp1, destRect, srcRect, GraphicsUnit.Pixel);
g.Dispose();
tmp1.Dispose();
David
|
|
|
|