We are using Log4Net to handle application logging. One of the requirement is to log all events to Event Viewer of the Web Server that's running the application.
I am unable to find out how to log the following:
User name (User using the application from remote).
Computer (the computer from which the application is started by the user. Currently it show the Server on which the app is running.)
Application runs in LAN only and user windows authentication.
Please help with a solution on how to add these details using the config file.
That's not possible with log4net and dotnetFramework API
enter image description here
Related
I have built a web application that uses Microsoft Graph to connect to OneDrive to upload files to a user's drive.
The web application is registered in Azure under the App Registrations and is also in the Enterprise Applications, having been granted permissions by an administrator to access OneDrive.
There is a section in the Office365 Admin Console to run searches and raise email alerts, however, the user that appears to be performing the action just comes through as 'app#sharepoint', so we cannot monitor what the actual web application is doing because this is too general.
The question I have is, is there any way to specifically monitor what this app is doing, in terms of uploading files or reading files? I don't know if there is any way set the user that the Enterprise App runs under, or if there is anything that the application can pass to identify itself?
To view a report on user specific activity details on OneDrive connected to via Graph to an app registered on Azure, use GET /reports/getOneDriveActivityUserDetail(period='{period_value}') or GET /reports/getOneDriveActivityUserDetail(date={date_value}).
You will however need Reports.Read.All application permission.
Please see the following documentation for a better understanding of the usage of this query: https://learn.microsoft.com/en-us/graph/api/reportroot-getonedriveactivityuserdetail?view=graph-rest-1.0#code-try-1
How can you give ApplicationPoolIdentity permissions to write to the Application Event Log?
I've read about adding a user to the permissions for HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog but I can't find the user ApplicationPoolIdentity
And how can I have this as part of the deployment for a web site? ... specifically to Azure Web App Service
You cannot modify the registry of an instance in App Service as the sandbox in Azure App Service doesn't allow you to modify registry. More details here
As long as you are not creating a new Event Source, your application logging will continue to work and the events will be written to EventLog.xml (which is a lightweight event log file). You can read more details about this in https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#access-to-event-log.
You can access the eventlog.xml file directly from KUDU under D:\HOME\LOGFILES folder, or from support portal or by using a website extension which I wrote some time back. More details on this in https://blogs.msdn.microsoft.com/puneetgupta/2014/09/24/azure-website-siteextension-to-view-eventlogs/
I've uploaded my web app onto azure and get the following error when i try to run it:
The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible logs: Security.
The code does write event logs and it works on local machines cause you can run it as an administrator.
How am i able to work around this in Azure?
Applications can write to the application event log but they do not have access to the SECURITY logs due to the sandbox . Any event logs written to application event log are visible in event log.xml....
More details in https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox
I am getting error while publishing the 2013 workflow via designer. Also, under sharepoint designer if I try to delete any workflow then the page just refreshes and the workflow does not get deleted.
I checked the services.msc and found that the workflow backend service was stopped. (this happened as the password of the user under which this serivce was running had changed).
So, the network admin changed the service user to LOCAL SYSTEM and started the service.
Now, the workflow backend service is started. We have also ran the iisreset.
However, I am still getting the same error:-
System.IO.InvalidDataException: A response was returned that did not come from the Workflow Manager. Status code = 503: Service Unavailable
Service Unavailable
HTTP Error 503. The service is unavailable.
Client ActivityId : ee94689c-4e08-b055-fe9c-268d7a94
Please find attached snapshot.
Is the error as a result of the change in service user? Can you tell me what priviledges should the account running the workflow backend service must have?
UPDATE 1
We have tried to set the account to farm admin and also tried to set it to site admin. Now, for a new web application, I can delete workflows. However, for existing site, I am not able to delete the existing workflows.. Also, I am not able to publish workflows (present under new and previous sites) and the error is same as described earlier.
Open IIS and make sure identify of the WorkflowMgmtPool is correct, you can re-type the identify. Then make this pool is started.
Check and reenter credentials for:-
Open Services.msc, find Service Bus Message Broker service and Windows Fabric Host Service. Make sure they are running. If not, firstly, start Windows Fabric Host Service, then start Service Bus Message Broker service. If Service Bus Message Broker service is started, stop and re-start it.
Reference- this forum link
This error occur because you have not registered the workflow correctly. Re-register the workflow and it will get solved. Also make sure you have activated the App management Service in your site features.
http://designerworkflow.blogspot.in/
Workflow Manager CU2 to get to 1.0 Refresh in Web Platform installer worked first time for me!
http://support.microsoft.com/kb/2902007/en-us
I had this same issue.
I was able to resolve it by going to IIS on my application server, editing the identity on the Workflow Management Application Pool, saving it and restarting it. I also restarted the server.
We are trying to expose a stored procedure (written in cobol) on our mainframe as a Web Service using IBM Websphere Message Broker. We then need to be able to use a Lotus Notes application (8.5.1) to talk to the web service and get the data returned by the stored procedure. We've run into several issues:
Let me preface this by saying that we haven't used Message Broker to expose anything as a web service before, nor have we used web services inside of Lotus Notes itself; however, we've had a contractor on site that has the Lotus Notes end working. That is to say, we can successfully create a web service consumer on the Lotus Notes end and get data when using a different web service we've created in .Net just to test this connectivity.
We've run into several issues so far. Any input would be greatly appreciated.
1) WSDL Access - We believe the stored procedure has been exposed as a web service on the broker end, however, we cannot access the wsdl when appending ?wsdl to the service url. Does this mean the web service is setup incorrectly?
2) We've also tried having Message Broker generate the wsdl and then import it into Lotus Notes via the import WSDL option of the Web Service Consumer (since we can't seem able to point to a url). Lotus Notes accepts the WSDL and creates the appropriate code to communicate with it. The issue here is that Broker appears to receive the request, but doesn't understand it.
We've been troubleshooting this for weeks and have had no luck. Please, any ideas would help.
Did you try debugging the web service with another application like SoapUI? And what version of the Lotus client are you using?