Initialize SMTP settings for ELMAH through code - elmah

The application includes:
ASP .NET MVC web app
DAL
Background Service
Library project
The web app and background service projects use the library project to send emails. SMTP settings are included in a config file in the library project itself.
In this scenario, is there a way to bind ELMAH to pick up SMTP settings from the library project? Perhaps if there's a way to configure ELMAH through code (during Application_Start), it would help achieve what's intended.
Guidance much appreciated.

You might find some use out of [this article].
Particularly the section about sending error reports automatically through email might be useful for you. Here's a more focused link with the same topic: [link]
Although these show how to setup a static address for your SMTP settings, I'm not sure I know how to dynamically create them at run-time based on a config file. If I find a way to do this in a better way I'll be sure to edit this answer or post a comment, but take a look at the links to see if they help for now.

You can configure elmah to post the error report to an HTML address. See this article.
When you set it to post to that address, you can have whatever back end you want catch it and send the email for you.
You mentioned you're using MVC, so you could have elmah post to a controller action that would then send the email, using the SMTP settings from your library project since you'd have access to the references there.

Related

jUDDI Installation and configuration

I have installed the basic jUDDI Server in my machine. I am able to Register the Service and able to read my Service info as a new user. I want to restrict the users who wants to look up my services. I want only my clients to access these information. I want to authenticate them so only my clients can view the business, service, tModel, Binding Template information. How can I achieve this? Can any body help me get through this?
Try turning on the setting the requires authentication for the inquiry API. You can find it in the juddiv3.xml config file for the server. Here's the xpath to get you there.
config/juddi/auth/Inquiry=true
Future readers, the documentation is located here for the current release (as of this time of this post)
https://juddi.apache.org/docs/3.3/juddi-guide/html/ch04.html#_administering_users_and_access_control
but the website https://juddi.apache.org/docs.html will get you to whatever is current. The docs (that website) is also available as part of the distribution and (i think) maven artifacts

How to create publish plugin for lightroom

I'm trying to find information on how to create a plugin for lightroom to publish photos to my website. Anyone know where I can get info?
I'm using django for my website if that matters.
There are two parts to this question: (1) how to write Lightroom plugins and (2) how to write a plugin that can publish photos (so, make an http request to upload a photo to a website).
You can find general information about writing Lightroom plugins on Lightroom Dev Center. This post on my blog may provide a simple starting point as well.
The example in the blog post may be helpful for another reason: it uses luasocket library that you will need to access to publish photos. Here is an example of how HTTP POST request can be made using this library. Note that the solution in the blog post includes this line package.loaded.socket = import "AgSocket" (executed in a module, not in a plugin), which preloads luasocket and makes it available to socket.http module.

Can I generate a wsdl file without binding and service information?

I came across an issue where a customer is able to open a SAP wsdl using net-beans as well as in .Net but not in soap UI.
When i checked the wsdl i found that service as well as binding tags are not defined or no such tags included. wsdl ends with port-type information.
In soap UI i got an error like no content in the file and when i try to open it in eclipse i am able to open it using web explorer window, but service as well binding information fields are empty. I could see ws-policy elements in customers wsdl.
How he might have produced a wsdl without binding and service information ?
What would be the reason he is telling it is working in .Net?
I am not sure about .Net tools.
Is there any web service client tool which can open the operations without endpoint /service information and send request/response ?..
please help
thank you for your time.
I only know a bit about the first question, can't help you with the other ones...
You can request two "flavors" of WSDL from a NW/ABAP system. This is related to the fact that the implementation (programming) of the service is usually performed on a different system and by different people than the configuration of the service.
After the service (or rather a service definition) has been implemented, you can get what's called a "design-time WSDL document". This document does not include the endpoint information - it cannot, because that would require technical information about the target system landscape and its configuration that is simply not available yet.
From the service definition, an administrator can create a configuration. This includes the binding information as well as stuff like base URL, security settings, transport layer settings and so on. With this configuration, you can generate a second WSDL document that contains the actual endpoint configuration.

Unable to load wsdl link in soap ui

Any buddy know how to resolve this issue.
Soap ui is not able to load WSDL link.
Please check the attached image. and let me the solution please.
It's probably a proxy/firewall problem. See if you can get that WSDL to load in a web browser. If so, check to see if your web browser is configured to use a proxy. I bet it is. In that case, you will need to use the same proxy setup in SoapUI.
I was able to get that WSDL to load without issue.
In SoapUI, go to:
File
New SoapUI project
Enter a project name
Paste the URL in the 'Initial WSDL/WADL' field
Click 'Ok'.
NOTE: I was able to do this using SoapUI Pro.
I solve this issue, it probably happened by firewall/proxy configuration issue.
Go to SoapUi Vmoptions in bin folder on Program files
Edit in notepad and add these below command to Vm options
-Dsoapui.https.protocols=SSLv3,TLSv1.2
And save it, then restart entire soap UI application.
First try to open that wsdl in a browser if you are able to open it there then you should be able to open it in soapUI. You should also check if there is any proxy being used on the browser or you have an incorrect proxy setup in soapUI.
I am able to open this url on my broswer and import it in soapUI.
I have downloaded the WSDL file which you should be able to use in soapUI to create a project without any issues. Check the link below, it will be available for 2 days.
https://docs.google.com/file/d/0B7mJBdNSSV-YWTdIXzYwcTJDaWs/edit?usp=sharing

Is there a way to bind my flex builder to my django application

I am trying to create simple flex application, which uses django as a back-end part. Have a question:
Usually when I run my application Flex Builder creates a file in a directory on my local PC and then opens a browser and points to it. Everything was fine, but when I decided to link django server to flex applications via xml data providers I started to get security errors. (Related to absence of crossdomain.xml). When I created the file and put it on the server:
<?xml version="1.0"?>
<!-- http://www.foo.com/crossdomain.xml -->
<cross-domain-policy>
<allow-access-from domain="http://127.0.0.1:8000"/>
<allow-access-from domain="127.0.0.1"/>
</cross-domain-policy>
Then tried the application again, I got error in console of my FB Error: Request for resource at http://127.0.0.1:8000/go/active/ by requestor from file:///Users/oleg/Documents/FB3/usersList/bin-debug/usersList.swf is denied due to lack of policy file permissions.
I don't know how to fix the error. But also the question is there a way to configure FB3 to put my swf files to the server directly, so I will not need any crossdomain?
Thanks
Oleg
We struggled with this a lot. The Flex security stuff didn't strike me as well built, but perhaps we just had different approaches in mind than Adobe's developers. The solution that worked for us was to serve both the SWF and the dynamic data from the same host and port.
On our development boxes, we tell Apache to serve the SWF from a directory in the workspace, and the dynamic data from a local copy of the app. When we push to production, SWF and app get pushed simultaneously to the same virtual host.
If that's inconvenient for you, the Apache ProxyPass directive can be used to make Apache front for other servers. I've not used that in production, but it's been very handy for developer setups.
I don't know a way to get FlexBuilder to automatically deploy your changed SWF; you could certainly look into an automation approach (like Maven and Flex-Mojos) to make that happen.
That said, getting rid of that error is usually just a matter of adding a policy file to the server.
The second error is caused because you're trying to fetch http resources from a "file" location. My recommendation is that you change your Flex Builder project so it outputs to a location within the Django web site, rather than to the flex-bin directory. This setting can be changed in the properties dialog of the project. Then, you should be able to have your front-end and back-end share the same protocol and domain.