Hi everybody,
For the moment, when an exception occur, I show a message error to the user.
But I want, in this case, keep the transaction in a queue to retry again later.
Do you know if a pattern to resolve my problem exist ???
thanks,
Tkanos
...
Hello,
is there a function that, given a C# type's string representation, returns the corresponding .Net type or .Net type's string representation; or any way to achieve this.
For example :
"bool" -> System.Boolean or "System.Boolean"
"int" -> System.Int32 or "System.Int32"
...
Thanks.
Edit : really sorry, it's not a "type to type...
My hosting provider (hostmysite.com) just changed to running medium trust on their hosted servers. This has caused the following NHibernate to product the following error:
[SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b...
I have a situation where I need to set my process' locale to en-US.
I know how to do this for the current thread:
System.Threading.Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
But my application uses BackgroundWorkers to do some processing, and the locale for these worke...
Hello!
Where do I put .resx files? Sometimes I see these files under Properties folder. Is there any design guideline about it?
Thank you!
...
I'd like to use the configSource attribute of my web config section to define external files for various settings.
Particularly, the appSettings section. This means my config file has the following entry:
<appSettings configSource="My.AppSettings.config" />
However, if this file is updated, the settings are not automatically picked u...
In my route collection I have
routes.MapRoute(
"Recalculate",
"{siteLanguage}/Formula.mvc/relcalculate/{identifierString}/{formulaId}/{wratio}/{customRecalcString}",
new { controller = "Formula", action = "Recalculate", wratio = "", customRecalcString = "" }
);
The action it maps to is
public ActionResult Recalculate(string ide...
I have several .NET applications in C#, along with an API for them to access the database. I want to put all versions of the API in the database, and have them pick the highest revision and build number, but stick with the major and minor number they were built with. Basically when I reference API 1.2.3.4 I want the reference to read 1.2...
Hi,
in our application we have some kind of online help. It works really simple: If the user clicks on the help button a URL is build depending on the current language and help context (e.g. "http://example.com/help/" + [LANG_ID] + "[HELP_CONTEXT]) and called within the browser.
So my question is: How can i check if a file exists on th...
Can I make an ASP.NET AJAX AutoCompleteExtender use an ASP.NET MVC JsonResult rather than an ASMX Webservice?
I've got an ASP.NET AJAX Toolkit AutoCompleteExtender on an ASP.NET MVC View. It uses an JsonResult type function in my MVC Controller.
ASP.NET MVC View:
<form runat="server">
<asp:ScriptManager
ID="ScriptManager1...
I'm trying to host two WCF services in one application. I want them to share the same BaseAddress but have their own URLs something like: net.tcp://localhost:1234/service1 and net.tcp://localhost:1234/service2
The following config allows me to do that:
<system.serviceModel>
<services>
<service name="VanillaWcf.Shared.MyServ...
Hi, I was wondering if anyone knows how to programatically get things like the version and copyright details out of a true type font. If you open it in explorer as well as the preview you get this info in the windows font viewer. I've looked at the Logfont structure but the info doesn't seem to be in here
Cheers
Luke
...
Possible Duplicates:
Getting the path of the current assembly
C#: How do I get the path of the assembly the code is in?
Using VB 2008, how can I get the file name of a running .EXE from inside itself?
EDIT: This is for a console app, so Application.ExecutablePath will not work.
...
I need to create a small app or script to install a .NET assembly into the GAC. I've read there are a couple ways to do this including:
using gacutil.exe
executing the following line of code:
new System.EnterpriseServices.Internal.Publish().GACInstall("Foo.dll");
However, what would happen if I just created the appropriate director...
Environment: 2 IIS7 servers, 1 appears to be compressing images the other is not, i want to turn off the compression.
I have a site running on two IIS7 server, when serving images from one server the GIFs look fine, when i serve them from the other instance, with the same files, the GIF color palette looks web safe or compressed or some...
I’m trying to use a SAPI 4 engine (L&H TTS 3000) from .net 3.5 using System.Speech.Synthesis in windows XP.
The problem is than I can only get SAPI 5.1 engines when I call GetInstalledVoices.
I’m using SAPI 4 because I need a Spanish TTS engine and L&H TTS 3000 is the only one free that I have found.
...
Hi Guys
I have a very interesting situation , i have figured out that Singleton pattern is not all possible with .net framework (Any version)
look at this code below
namespace SingletonPattern
{
class Singleton
{
private static readonly Singleton instance = new Singleton();
private static int mcount = 0;
private ...
I'm trying to add a generated COM interop assembly project to my solution, and the only solution I could come up with feels really nasty.
I created a .net dll project, removed all .cs files from it and then created the following post-build event:
call "$(DevEnvDir)..\tools\vsvars32.bat"
midl.exe $(ProjectDir)relative-path-to-my-idl\MyC...
I am having issues with ADO.NET 2.0 merging/importing data. I need to update/insert data from one generic table to another table with both tables maintaining an identical schema. The following code works great locally, but does not make changes to the database:
OleDbDataAdapter localDA = loadLocalData();
Ol...
I'm trying to access a windows service (also created by me) through a WinForms application using ServiceController:
service = new System.ServiceProcess.ServiceController("MyService")
The service returns OK and I can see the status via myservice.Status.
But when i try to start (or stop) it, it returns the error:
Unable to open ser...