Having trouble with Logging Application Block (EntLib 5) on Windows Server 2003R2 - enterprise-library

Typical scenario, I am using EntLib 5.0-April 2010 Logging on my development machine and everything works like a charm, when I try to put in production on our web server, it does not work.
Development machine is Windows 7 using VS2008.
Production server is Windows Server 2003 R2 with Microsoft .NET Framework 3.5 with Service Pack 1.
I am including the LAB DLLs in the project (Common, Logging, ServiceLocation), not in the GAC.
Any ideas?
thanks in advance

It turns out that since I was running the web app from VS run as an administrator, the LogSource is created for me. When in production, the app is run with normal privileges and requires the LogSource to be created by an admin. Check out the following:
http://entlib.codeplex.com/wikipage?title=Why%20are%20messages%20not%20logged?&referringTitle=EntLib%20FAQ

Create a console application and write these lines:
class Program
{
static void Main(string[] args)
{
System.Diagnostics.EventLog.CreateEventSource("Enterprise Library Logging", "Application");
System.Diagnostics.EventLog.WriteEntry("Application", "Sample error", System.Diagnostics.EventLogEntryType.Error);
}
}
Copy the exe file to the Server , and run it as Administrator. Then , in Event Viewer, you'll see the message "Sample error" to ensure the lines were executed.
It will solve your problem.

Related

Debug RESTful service from external device, unfamiliar error message

I have been working on a RESTful service (with VS 2015) for about 4 months now, on a Windows 7 development laptop (I don't know if Windows 7 is playing a role here, but I mention it for completeness).
I just purchased a new development machine with Windows 10. I copied my code to that machine, installed VS2015, etc (re-created my development environment).
When I right-click the service project and select Debug->Start new instance, everything works fine, and I can interact with the service from a browser using "http://localhost:[port]/api....."
However, I wish to interact with the service via my android app, that I am developing. I followed the instructions here:
http://becdetat.com/access-iis-express-from-another-machine.html
Namely, I ran the "netsh" command, made the necessary changes to applicationhost.config, etc. On my Windows 7 machine, this worked great and I was able to develop my mobile app.
However, on my new machine, the command:
netsh http add urlacl url=http://192.168.xx.xx:[port]/ user=everyone
causes me to get an error when I attempt to start the service in the debugger. The error is "There was a temporary DNS error. Try refreshing the page. Error Code: INET_E_RESOURCE_NOT_FOUND"
If I then execute:
netsh http delete urlacl url=http://192.168.xx.xx:[port]/
the service runs fine, but I still cannot access it from my android device.
As I mentioned, this worked just fine on my Windows 7 machine.
Thanks for any help.....

could not reach CMS from JBOSS

I have ran into something interesting. We are upgrading our SAP BO from 4.2 SP2 to 4.2 SP5. So we have a java application which runs on JBoss connects to the BO reports.
So as part of upgrade I have updated all my SAP jars and tried connecting to the new CMS. To test out initially i used the below code and ran it using main method I was able to connect to the CMS and get the Session.
ITrustedPrincipal trustedPrincipal = sessionMgr.createTrustedPrincipal("user1", "myCMS:6400");
session = sessionMgr.logon(trustedPrincipal);
But when I run the same code on JBoss, I get
Could not reach CMS 'myCMS:6400'. Specify the correct host and port
and check for network issues
Can some one please suggest what I am doing wrong?

VSTS IIS Web App Deploy fails with return 2148734720

I configured releases same way for a couple of our servers but I have issue with one of them (others work perfectly):
[error]Failed to deploy web package to IIS website.
[error]Error: C:\vstsagent\A2_work_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.0.20\MSDeploy3.6\msdeploy.exe failed with return code: 2148734720
Unfortunately I can't find anything helpful related to this error Code.
My release configuration:
IIS Web App Deploy (Preview)
Deployment group with one specific staging server (I'm using on-premise agent)
Website name: correct name of my website in IIS
Virtual Application: empty field
Package of Folder: zip chosen from build drop artifacts
Selected "XML variable substitution"
Selected "Remove Additional Files at Destination"
What I've already tried with no luck:
manually turn of application
delete all files in application folder
changing user account to use for the service
Again - same configuration for other servers works fine.
Servers configuration: Windows Server 2012R2 Standard x64
Looks like I figured it out. .NET Framework 3.5 was missing on my server...
I was investigating logs and I found out that below line is causing failure.
"C:\vstsagent\A2\_work\_tasks\IISWebAppDeploymentOnMachineGroup_1b467810-6725-4b6d-accd-886174c09bba\0.0.20\MSDeploy3.6\msdeploy.exe" -verb:sync -source:package='C:\vstsagent\A2\_work\r2\a\temp_web_package_8269135298977384.zip' -dest:auto -setParam:name='IIS Web Application Name',value='httproot'
So I copied it to CMD and got proper Windows message when I tried to execute it.

.net xAPI not working in Unity

I've downloaded the .NET xAPI from here: https://github.com/RusticiSoftware/TinCanAPILibraryCSharp
When I test the code in console mode I am able to make a connection with both my local server and public lrs: http://tincanapi.com/public-lrs/
However, when I run that same code from Unity, I can only make a connection with my local server, I can no longer connect with the public lrs or any other remote server for that matter, I keep getting "no internet connection" and nothing else.
Any ideas on what this could be??
Currently and if i m right, running dlls compiled with .NET frameworks > 3.5 on unity3d can be a problem. Considering tin can is newly released... Maybe your problem is related?
If you create the dll yourself, be sure to focus on .Net framework 3.5

ASP.NET MVC 2 + VS2k10 Empty Start Page

I have a problem where, on some developer machines, everything resolves correctly and the start page is as expected (/Home/Index), but on other developer machines, it will just render a directory listing of the website root. When creating a virtual directory, it works, but we would prefer to use the development server initially if possible.
It's worth mentioning the OS we are working with is XP.
Any help would be greatly appreciated!
Are you talking about running your website through IIS or through Visual Studio's built in web server (Cassini)?
It sounds like you are using IIS and it is not configured for running MVC properly but without further information it's hard to say.
I would compare the IIS configuration between a working machine and one that doesn't