Click here to Skip to main content
15,892,059 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionHow to register an assembly in asp.net web app? Pin
choorakkuttyil12-Sep-06 1:58
choorakkuttyil12-Sep-06 1:58 
AnswerRe: How to register an assembly in asp.net web app? Pin
Christian Graus12-Sep-06 12:13
protectorChristian Graus12-Sep-06 12:13 
QuestionWhat's the best HTML Editor for Win Forms (.NET 2.0)? Pin
Yuval Naveh11-Sep-06 22:46
Yuval Naveh11-Sep-06 22:46 
QuestionClickOnce and Security Pin
Brady Kelly11-Sep-06 22:22
Brady Kelly11-Sep-06 22:22 
AnswerRe: ClickOnce and Security Pin
Jakob Farian Krarup17-Sep-06 19:20
Jakob Farian Krarup17-Sep-06 19:20 
GeneralRe: ClickOnce and Security Pin
Brady Kelly17-Sep-06 21:45
Brady Kelly17-Sep-06 21:45 
GeneralRe: ClickOnce and Security Pin
Jakob Farian Krarup17-Sep-06 21:54
Jakob Farian Krarup17-Sep-06 21:54 
QuestionWeb Service Problem Pin
Jaco van Staden11-Sep-06 19:52
Jaco van Staden11-Sep-06 19:52 
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());
}
}
}
QuestionMax Number of Asynchronous Sockets Pin
Subby Dev11-Sep-06 14:07
Subby Dev11-Sep-06 14:07 
QuestionIntercepting messaging from sscesa20.dll Pin
doctorgoon11-Sep-06 11:08
doctorgoon11-Sep-06 11:08 
QuestionDirectX Programming with .Net Pin
kannan m11-Sep-06 3:29
kannan m11-Sep-06 3:29 
AnswerRe: DirectX Programming with .Net Pin
lmoelleb11-Sep-06 20:55
lmoelleb11-Sep-06 20:55 
Questionhow to add wizard control Pin
Parshant Verma11-Sep-06 0:00
Parshant Verma11-Sep-06 0:00 
AnswerRe: how to add wizard control Pin
Not Active11-Sep-06 3:57
mentorNot Active11-Sep-06 3:57 
Questiondisposing of unmanaged objects in an activex component Pin
alianyn10-Sep-06 21:56
alianyn10-Sep-06 21:56 
AnswerRe: disposing of unmanaged objects in an activex component Pin
Dave Kreskowiak11-Sep-06 5:58
mveDave Kreskowiak11-Sep-06 5:58 
GeneralRe: disposing of unmanaged objects in an activex component Pin
alianyn12-Sep-06 11:25
alianyn12-Sep-06 11:25 
GeneralRe: disposing of unmanaged objects in an activex component Pin
Dave Kreskowiak12-Sep-06 12:12
mveDave Kreskowiak12-Sep-06 12:12 
QuestionRemoting and Microsoft firewall Pin
msglott10-Sep-06 11:41
msglott10-Sep-06 11:41 
AnswerRe: Remoting and Microsoft firewall Pin
Dave Kreskowiak10-Sep-06 16:18
mveDave Kreskowiak10-Sep-06 16:18 
GeneralRe: Remoting and Microsoft firewall Pin
msglott11-Sep-06 2:45
msglott11-Sep-06 2:45 
GeneralRe: Remoting and Microsoft firewall Pin
Dave Kreskowiak11-Sep-06 5:55
mveDave Kreskowiak11-Sep-06 5:55 
GeneralRe: Remoting and Microsoft firewall Pin
msglott11-Sep-06 6:08
msglott11-Sep-06 6:08 
QuestionDocument Management System - picking up emails Pin
Ross Petersen10-Sep-06 10:35
Ross Petersen10-Sep-06 10:35 
QuestionWCF - please tell me how to check from the client whether the WCF service is running? Pin
sam.gamaliyal10-Sep-06 3:14
sam.gamaliyal10-Sep-06 3:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.