I'm writing a WCF service in C#. Initially my implementation had a static constructor to do some one-time initialization, but some of the initialization that is being done might (temporarily) fail.
It appears that static constructors are only called once, even if the first (failed) attempt threw an exception? Any subsequent attempts to ...
Hello,
I have a binary file. It consists of 4 messages, each is inthe size of 100 bytes.
I want to read that last 2 messages again. I am using BinaryReader object.
I seek to psosition 200 and then I read: BinaryReaderObject.read(charBuffer, 0, 10000),
where charBuffer is big enougth.
I get all the time the a mount of read is always miss...
I just moved my application under a virtual path on my local iis 7.0 so that I can host multiple sites.. Routes are not working part from the main page
They seem to ignore the virtual path I created and going to the root - eg:
instead of http://localhost/virtualpath/product/5
goes to http://localhost/product/5
I seem to be missing so...
I've received a project for internal use. My application has to store about 100 rows of meta data of a game and each row has about 15 fields maximum. Fields can be game name, game category, maker, source code path, etc. I will most likely have to join about 5-10 tables for each row of record. Only a few people are using it and will recei...
I have integrated NHibernate.Search into my web app by following tutorials from the following sources:
NHibernate.Search using Lucene.NET Full Text Index (Part 1)
Using NHibernate.Search with ActiveRecord
I have also successfully batch-indexed my database, and when testing against Luke, I can search for terms that reside in whatever ...
When i start to debug application i am getting this error Can any one give me the solution
Error 1 The command "xcopy "F:\asoadmin_ML_view\leaf\Console\Bin\Debug\Console.*" "F:\leafPRODUCT\Bin" /f /e /y /i
xcopy "F:\leafPRODUCT..\voyagerhtml\Operations Sentinel Console Help*.chm" "F:\leafPRODUCT\Help" /f /e /y /i
" exited with code 4...
Is there a possibility to initialize a WebService.
I'm searching for a method that runs only during first call to WebService. Is there something like it in .Net ?
...
We are currently distributing a WinForms app without .pdb files to conserve space on client machines and download bandwidth. When we get stack traces, we are getting method names but not line numbers. Is there any way to get the line numbers without resorting to distributing the .pdb files?
...
I have a simple XML file:
<?xml version="1.0" encoding="utf-8"?>
<ConvenioValidacao>
<convenio ven_codigo="1" tipoValidacao="CPF"></convenio>
<convenio ven_codigo="1" tipoValidacao="MATRICULA"></convenio>
<convenio ven_codigo="3" tipoValidacao="CPF"></convenio>
<convenio ven_codigo="4" tipoValidacao="CPF"></convenio>
</C...
Hello,
How do I use for loop in vb.net something like
dim start as integer
Dim customers as New List(Of Customers)
Customers=dataAcess.GetCustomers()
For each start=500 in Customers.count
'Do something here'
Next
I want to process some data for each 500 customers.. Please help
...
I have a base page class where i set client target with
protected override void FrameworkInitialize()
{
base.FrameworkInitialize();
ClientTarget = "ie5";
}
for standart rendering for all browser. I now i need to change it to it's original state (auto?) for a single page that inherits my base page class.
How can i do it?
...
Is there a tool for automated test discovery for .NET. I am using the Visual Studio unit testing stuff and wanted functionality similar to Python Nose. I need to have a tool automatically discover all the unit test available and run for example the ones "marked" as unit and in different scenarios run the tests "marked" as Integration a...
When I wish to bind a control to a property of my object, I have to provide the name of the property as a string. This is not very good because:
If the property is removed or
renamed, I don’t get a compiler
warning.
If a rename the property
with a refactoring tool, it is
likely the data binding will not be
updated.
I don’t get an er...
I have a user control that has a textbox. I have tried to expose the texbox's Text property by implementing a DependencyProperty with the same name in the UserControl. Thus:
public static readonly DependencyProperty TextProperty =
DependencyProperty.Register("Text",
typeof(string),
...
Is it possible to rename a report section in a crystal reports using the version of crystal that is built into Visual Studio 2008?
If so how can this be done.
...
Despite going on a training course for Workflow Foundation earlier this year, I recently abandoned an attempt to use it in a project because there were just too many compromises to get it to work. There are few extension points (everything is sealed, and the mechanisms for getting data/events into and out of a workflow instance are just...
How can I delete a specific line of text in a RickTextBox ?
...
My code:
var list = new LinkedList<int>();
var ramCounter = new PerformanceCounter("Memory", "Available MBytes");
while (true)
{
for(int i = 0; i < 1000 * 1000; i++) list.AddLast(0);
Console.WriteLine(ramCounter.NextValue());
}
Questions:
The documentation seems to say I can use a PerformanceCounter only as an Administrator,...
Hello everyone,
I am using Networking Tab of Windows Task manager to monitor local network traffic to test how much bandwidth my application will use. My scenario is, I will use a local console client application to send data (using Http POST method) to local IIS 7.0 server.
My issue is no traffic could be monitored using Networking Ta...
If I have a simple CRUD app executable in .NET, what prevents a user from loading it into RedGate Reflector and viewing all the contents, including db connection strings, passwords, etc?
Can I protect against this in any way?
...