|
Hi Brady
One way of doing it is to add the URL (or website) of the clickonce application to the "trusted sites" zone in Internet Explorer. This should be read by the security mechanism of the CLR.
If this doesn't work - reply again and we'll try something else
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
Thanks Jakob, I've come right signing the deployment with our cert. That was a relativel easy part. The hard bit was passing command line arguments to the application.
|
|
|
|
|
...yup that's another way of doing it
And - you're right - the command line parameters are tricky
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
Hi Guys,
I'm getting the following error and it's a very strange one:
______________________________________________________________________________
File or assembly name mlj0rqcf.dll, or one of its dependencies, was not found.
=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\DOCUME~1\JAVANS~1\LOCALS~1\Temp\mlj0rqcf.dll
LOG: Appbase = C:\Shoprite\MoneyMarket\Electricity\Oostenberg\Electricity.Oostenberg.Forms\Oostenberg.Forms.Test\bin\Debug\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/DOCUME~1/JAVANS~1/LOCALS~1/Temp/mlj0rqcf.dll.
______________________________________________________________________________
What makes it strange is that the file mlj0rqcf.dll keeps changing every single time you run the code. To further enhance the strangeness, the code actually works when you pop it into the GAC.
There's no problem that I can see with code and no reason for it to break, but of course I don't know the solution to the problem.
The code are as follows:
using System;
using System.Xml;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using Shoprite.MoneyMarket.Electricity.Oostenberg.Forms.Test.WebReference;
// using Shoprite.MoneyMarket.Utilities;
// using Shoprite.MoneyMarket.Electricity.Oostenberg.Entities;
namespace Shoprite.MoneyMarket.Electricity.Oostenberg.Forms.Test
{
public class frmAccountDetail : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TextBox txtMeterNumber;
private System.Windows.Forms.Button btnLoadAccountDetails;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtConsumer;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtMinLimit;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtFreeSubsidy;
private System.Windows.Forms.TextBox txtMessage;
private System.Windows.Forms.TextBox txtMaxLimit;
private System.Windows.Forms.Button btnDeserialize;
private System.Windows.Forms.Button btnChangeNamespace;
private System.ComponentModel.Container components = null;
public frmAccountDetail()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.btnLoadAccountDetails = new System.Windows.Forms.Button();
this.txtMeterNumber = new System.Windows.Forms.TextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.txtMessage = new System.Windows.Forms.TextBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label();
this.txtFreeSubsidy = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtMaxLimit = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.txtMinLimit = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.txtAddress = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtConsumer = new System.Windows.Forms.TextBox();
this.btnClose = new System.Windows.Forms.Button();
this.btnDeserialize = new System.Windows.Forms.Button();
this.btnChangeNamespace = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.btnLoadAccountDetails);
this.groupBox1.Controls.Add(this.txtMeterNumber);
this.groupBox1.Controls.Add(this.groupBox3);
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.Location = new System.Drawing.Point(8, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(616, 368);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Account Details";
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(184, 23);
this.label1.TabIndex = 4;
this.label1.Text = "Meter Number";
//
// btnLoadAccountDetails
//
this.btnLoadAccountDetails.Location = new System.Drawing.Point(480, 24);
this.btnLoadAccountDetails.Name = "btnLoadAccountDetails";
this.btnLoadAccountDetails.Size = new System.Drawing.Size(128, 24);
this.btnLoadAccountDetails.TabIndex = 3;
this.btnLoadAccountDetails.Text = "Load Account Details";
this.btnLoadAccountDetails.Click += new System.EventHandler(this.btnLoadAccountDetails_Click);
//
// txtMeterNumber
//
this.txtMeterNumber.Location = new System.Drawing.Point(208, 24);
this.txtMeterNumber.Name = "txtMeterNumber";
this.txtMeterNumber.Size = new System.Drawing.Size(264, 20);
this.txtMeterNumber.TabIndex = 2;
this.txtMeterNumber.Text = "39982";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.txtMessage);
this.groupBox3.Location = new System.Drawing.Point(8, 192);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(600, 168);
this.groupBox3.TabIndex = 1;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Message";
//
// txtMessage
//
this.txtMessage.Location = new System.Drawing.Point(8, 16);
this.txtMessage.Multiline = true;
this.txtMessage.Name = "txtMessage";
this.txtMessage.Size = new System.Drawing.Size(584, 144);
this.txtMessage.TabIndex = 15;
this.txtMessage.Text = "";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label6);
this.groupBox2.Controls.Add(this.txtFreeSubsidy);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Controls.Add(this.txtMaxLimit);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.txtMinLimit);
this.groupBox2.Controls.Add(this.label3);
this.groupBox2.Controls.Add(this.txtAddress);
this.groupBox2.Controls.Add(this.label2);
this.groupBox2.Controls.Add(this.txtConsumer);
this.groupBox2.Location = new System.Drawing.Point(8, 48);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(600, 144);
this.groupBox2.TabIndex = 0;
this.groupBox2.TabStop = false;
//
// label6
//
this.label6.Location = new System.Drawing.Point(8, 112);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(184, 23);
this.label6.TabIndex = 13;
this.label6.Text = "Free Subsidy";
//
// txtFreeSubsidy
//
this.txtFreeSubsidy.Location = new System.Drawing.Point(200, 112);
this.txtFreeSubsidy.Name = "txtFreeSubsidy";
this.txtFreeSubsidy.Size = new System.Drawing.Size(392, 20);
this.txtFreeSubsidy.TabIndex = 12;
this.txtFreeSubsidy.Text = "";
//
// label5
//
this.label5.Location = new System.Drawing.Point(8, 88);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(184, 23);
this.label5.TabIndex = 11;
this.label5.Text = "Maximum Limit";
//
// txtMaxLimit
//
this.txtMaxLimit.Location = new System.Drawing.Point(200, 88);
this.txtMaxLimit.Name = "txtMaxLimit";
this.txtMaxLimit.Size = new System.Drawing.Size(392, 20);
this.txtMaxLimit.TabIndex = 10;
this.txtMaxLimit.Text = "";
//
// label4
//
this.label4.Location = new System.Drawing.Point(8, 64);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(184, 23);
this.label4.TabIndex = 9;
this.label4.Text = "Minimum Limit";
//
// txtMinLimit
//
this.txtMinLimit.Location = new System.Drawing.Point(200, 64);
this.txtMinLimit.Name = "txtMinLimit";
this.txtMinLimit.Size = new System.Drawing.Size(392, 20);
this.txtMinLimit.TabIndex = 8;
this.txtMinLimit.Text = "";
//
// label3
//
this.label3.Location = new System.Drawing.Point(8, 40);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(184, 23);
this.label3.TabIndex = 7;
this.label3.Text = "Address";
//
// txtAddress
//
this.txtAddress.Location = new System.Drawing.Point(200, 40);
this.txtAddress.Name = "txtAddress";
this.txtAddress.Size = new System.Drawing.Size(392, 20);
this.txtAddress.TabIndex = 6;
this.txtAddress.Text = "";
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 16);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(184, 23);
this.label2.TabIndex = 5;
this.label2.Text = "Consumer";
//
// txtConsumer
//
this.txtConsumer.Location = new System.Drawing.Point(200, 16);
this.txtConsumer.Name = "txtConsumer";
this.txtConsumer.Size = new System.Drawing.Size(392, 20);
this.txtConsumer.TabIndex = 0;
this.txtConsumer.Text = "";
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(536, 376);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(88, 24);
this.btnClose.TabIndex = 1;
this.btnClose.Text = "Close";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// btnDeserialize
//
this.btnDeserialize.Location = new System.Drawing.Point(400, 376);
this.btnDeserialize.Name = "btnDeserialize";
this.btnDeserialize.Size = new System.Drawing.Size(128, 24);
this.btnDeserialize.TabIndex = 4;
this.btnDeserialize.Text = "Deserialize Message";
this.btnDeserialize.Click += new System.EventHandler(this.btnDeserialize_Click);
//
// btnChangeNamespace
//
this.btnChangeNamespace.Location = new System.Drawing.Point(264, 376);
this.btnChangeNamespace.Name = "btnChangeNamespace";
this.btnChangeNamespace.Size = new System.Drawing.Size(128, 24);
this.btnChangeNamespace.TabIndex = 5;
this.btnChangeNamespace.Text = "Change Namespace";
this.btnChangeNamespace.Click += new System.EventHandler(this.btnChangeNamespace_Click);
//
// frmAccountDetail
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(632, 406);
this.Controls.Add(this.btnChangeNamespace);
this.Controls.Add(this.btnDeserialize);
this.Controls.Add(this.btnClose);
this.Controls.Add(this.groupBox1);
this.Name = "frmAccountDetail";
this.Text = "frmAccountDetail";
this.groupBox1.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private void btnLoadAccountDetails_Click(object sender, System.EventArgs e)
{
txtMessage.Text = string.Empty;
string _meterNumber = txtMeterNumber.Text;
string _userName = "userName";
string _password = "password";
string _municipalityCode = "3498";
string _branchReference = Guid.NewGuid().ToString();
string CreationDate = DateTime.Now.ToString("yyyy-MM-dd") + "T" + DateTime.Now.ToString("HH:mm:ss");
string[] headerDetails = new string[5];
headerDetails[0] = "username=" + _userName; // Username
headerDetails[1] = "password=" + _password; // Password
headerDetails[2] = "municipalityCode=" + _municipalityCode; // Municipality Code
headerDetails[3] = "referenceNumber=" + _branchReference; // Branch Reference
headerDetails[4] = "dateTime=" + CreationDate; // CreationDate
try
{
// This is the line that breaks every single time.
Oostenberg.Forms.Test.WebReference.WebServices elSrv = new Oostenberg.Forms.Test.WebReference.WebServices();
elSrv.Url = "http://SomeWebService";
elSrv.Proxy = null;
accountDetails acntDetails = elSrv.getAccountDetails(headerDetails, _meterNumber);
txtConsumer.Text = acntDetails.consumer;
txtAddress.Text = acntDetails.address;
txtMinLimit.Text = acntDetails.minLimit.ToString();
txtMaxLimit.Text = acntDetails.maxLimit.ToString();
txtFreeSubsidy.Text = acntDetails.freeSubsidy.ToString();
XmlDocument document = new XmlDocument();
// document.Load(acntDetails.Serialize());
// document = Utilities.Xml.ChangeNamespace(document, acntDetails.ResponseNamespace);
txtMessage.Text = document.OuterXml;
}
catch (System.IO.FileNotFoundException ex)
{
txtMessage.Text = ex.Message + Environment.NewLine + ex.FusionLog;
return;
}
catch (Exception ex)
{
txtMessage.Text = ex.Message;
return;
}
}
private void btnDeserialize_Click(object sender, System.EventArgs e)
{
// if (txtMessage.Text.Trim() != string.Empty)
// {
// AccountDetails acntDetails = new AccountDetails();
//
// try
// {
// acntDetails = (AccountDetails) acntDetails.Deserialize(Streams.ConvertToStream(txtMessage.Text));
// }
// catch (Exception ex)
// {
// txtMessage.Text = ex.Message;
// return;
// }
//
// MessageBox.Show(acntDetails.Consumer);
// }
}
private void btnClose_Click(object sender, System.EventArgs e)
{
Close();
}
private void btnChangeNamespace_Click(object sender, System.EventArgs e)
{
if (txtMessage.Text.Trim().Length != 0)
{
XmlDocument document = new XmlDocument();
}
}
[STAThread]
static void Main()
{
Application.Run(new frmAccountDetail());
}
}
}
|
|
|
|
|
Hi,
I have developed a windows service which starts multiple processes on a client machine and communicates with those. I use multiple sockets and asynchronous communication. This service may require to start multiple processes and to handle communication with those. But I have seen that when the number of client processes reaches 24 the service starts reporting following error. I am assuming this is related to threadpool because total concurrent threads reach at max (25) after 24 processes including one main thread (24+1).
Event Type: Error
Event Source: .NET Runtime
Event Category: None
Event ID: 0
Date: 9/8/2006
Time: 11:05:38 AM
User: N/A
Description:
The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: .NET Runtime version 1.1.4322.573- .NET Framework Initialization Error: C:\WINNT\Microsoft.NET\Framework\v1.1.4322\mscorwks.dll could not be loaded.
I have tried setting maximum num of worker threads and IO Completion threads using SetMaxThreads method exposed by ICorThreadPool interface, but no help.
Any helping comment much appreciated.
Thanks in advance,
|
|
|
|
|
I have a mobile app using sqlce 2.0 connecting to an sql server 2000 db. I am able to push, pull and execute sql statements no problem. I would like to be able to "sniff" messaging and data going between sqlce on the mobile device and sql 2000 server with another app(c# .net) running on the same physical drive as sql server, IIS and sscesa20.dll. Does anyone have any suggestions on how to handle this? Thanks in advance for your help!
doc...
@@@by doc...
|
|
|
|
|
hii i am kannan.currently im working with a project in VB.Net. the project is, i've to create a reader for pdf files.the reader uploading a pdf file and user can read it like a real magazine. and we know we are flipping/turns each page of a real magazine to go for the next/Previous page. I WANT THE SAME PAGE FLIP EFFECT IN MY PROJECT.i heard that directx + vb.net wil gimme a solution.
you can see an example reader at www.zinio.com, its free for download. i need the same effect in my project. I have a components that converts each page of a pdf file to image file, which then i need to animate. Can you suggest me some idea. Is it possible using directx.
|
|
|
|
|
I assume it can be done with DirectX (I am NOT going to download random software to see exactly what effect it is, but assume you actually see the page flipping over).
And before you ask how it is done: read the tutorials included with the SDK. If you want to do DirectX there is no shortcut. You need to understand the mapping of coordinates in 3D, how to render your image as a texture over a triangle mesh etc.
Personally I would use WPF - DirectX is a mess to program as you have to deal with the most pathetic and completely irrelevat things like lost device etc).
|
|
|
|
|
Hi
i 'm using c# for GUI. i want to know how to use wizard control in it.
Wizard control that has Next,Back and canael button.
please tell me step by step
i m using .net2003
Thank u
Parshant
|
|
|
|
|
The first step is to ask the same question in another forum and ignore the response you get there.
only two letters away from being an asset
|
|
|
|
|
I have set up an "ActiveX" component by creating a Class Library project in VS2005 and displaying it on a webpage as explained here.
In this Component i am doing some database monitoring and drawing on the form using a timer (System.Timers.Timer). The objects through which i connect and query the DB need to be disposed of when the Component is destroyed/Disposed of, but i can not seem to make that happen.
What i mean is that the Dispose method for my object is not being called nor is my Destructor, when the browser exits.
Is there some other event i could monitor or a way to implement this that i am missing or don't know about?
If any Code needs pasting, please let me know.
|
|
|
|
|
That depends on how you've written your database code. You should be opening a connection, retrieving your data, then closing and disposing of the connection on each Timer tick.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks for the reply dave, and I agree that would be good form, but I thought i mentioned in my first message that I can not do that since i have to poll data from the DB every 1 second, creating the connection usually takes anywhere between 1-5 seconds (depends on the traffic really) so it would be impossible to implement an open->poll->close method which would be able to work every 1 second.
I guess my real problem is that i'm having a hard time accepting that neither my D'tor nor Dispose are called and that there seems to be no notification of the parent browser closing.
or am I wrong about that?
|
|
|
|
|
alianyn wrote: but I thought i mentioned in my first message that I can not do that since i have to poll data from the DB every 1 second,
Nope. You made no mention of the interval, not that you couldn't do this.
AFAIK, there is no notification the browser is closing. Inside a browser, I have no idea if the CLR Host gets to do any garbage collection before it gets shutdown by the host. It would seem kind of ridiculous.
If the traffic is making the connection take 1-5 seconds, and all connections after that (I assume you tested this!), then how are you going to poll for a dataset inside of that 1 second interval and redraw?
I only mention the connection thing because ADO.NET supports automatic connection pooling[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I have tried both httpchannel and tcpchannel and in both cases when I start the server channel the microsoft firewall comes up and asks whether to block or not.
I have not been able to figure out how to stop this. I do not want to have to change the settings on the firewall.
thanks for any help
|
|
|
|
|
You don't have a choice. No matter what firewall your client uses, you will have to punch a hole in it to allow communication. Unless the hole is already there!
Browsers usually work by default because the outbound hole is already punched. But the inbound hole on that port is blocked so outside machines can't just push their way through on that port. The inbound hole is opened up only when the client requests a connection from the inside of the firewall and then the remote machine makes a request to connect back to the client to establish two-way communication.
What good what a firewall be if any application can just "get around it" because it's more convenient for the customer? Why not just make viruses "more convenient" then?
If you do remoting over a network card at all, your customer will have to know which ports you're using and punch those holes if they don't already exist.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I thank you much for the answer and now realize I needed to provide additional information.
I am trying to create a remote server that will be available to other applications on the SAME machine.
For various reasons they have to be in different machine processes.
The answer may still be the same but at least the question is a little clearer.
Perhaps there is another methodology that I have not heard of ?
thanks in advance
|
|
|
|
|
You've got the same problem. If you go over the network stack AT ALL, you're subject to the rules imposed by the firewall, even if the server and client are going through 127.0.0.1.
If you're using the .NET Framework 2.0, you can use the System.Runtime.Remoting.Channels.Ipc[^] namespace. It provides remoting over Windows' Interprocess Communication subsystem, thereby avoiding network-based communication. It's much faster than HTTP or Sockets based channels.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Many Thanks
I had not even heard on that one. I tried it and it did not cause the Microsoft Firewall to pop-up a message.
|
|
|
|
|
Hi folks
I am designing a DB system that will either have a windows forms or a web
form interface.
Part of it involves being able to record a reference to emails sent to
people outside the organisation or received by people within the organisation
that has been sent by somebody outside the organisation. The objective is to
record basic details such as date, sender, receiver, and subject.
Given the fact that a certain percentage of the emails will be private
(nothing to do with the organisation) there needs to be a mechanism for the
person sending or receiving the email to identify the email as being
applicable.
In the UI, it should be possible to open the email by clicking on a hyperlink.
Some people within the organisation use Outlook, while some use Outlook
Express.
I was hoping that somebody might be able to give some general advice about
this application.
Many thanks in advance
Kind regards
Ross Petersen
|
|
|
|
|
Can anybody please tell me how to check from the client whether the WCF service is running?
Regards
Sam
|
|
|
|
|
About all you can do is try and connect - if you get a timeout it is most likely not running (or at least not accessible).
|
|
|
|
|
I can change Width of combobox but how can I change width of combobox
|
|
|
|
|
if u can change the WIDTH u should be able to change the WIDTH as well........cheers
ihtesham
|
|
|
|
|
I put dataset and bindingsource and some textbox on my form
my program work correct (add,delete,edit)
but I do not know how can change one field of dataset without use textbox
I put this code :
dataset.mytable.mycoulmn[bindingdatasource.position]="test";
but at runtime appear error of position
|
|
|
|