Unable to access template

First of all, thank you for your wonderfull work. It help us a lot.

We have a problem with send mail function, have reviewed all post related with no solution by now.

We have deployed this solution in a web server and configured all XSLT relative URL as shown in the documentation. We've tried all those url in the adresses bar of the browser, adding before the web application domain name, and worked correctly.

When we execute the recover password function it generates a generic error. Reviewing Sharepoint log file we find this error:

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond     at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)     at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)     --- End of inner exception stack trace ---     at System.Net.HttpWebRequest.GetResponse()     at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials c... 3a15bf59-e14f-4070-84cd-44370e55aa6a05/30/2012 10:00:47.29* w3wp.exe (0x1E38)                       0x2E34 SharePoint 2010 FBA Pack       General                       0000 High     ...redentials)     at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)     at System.Xml.Xsl.Xslt.XsltLoader.CreateReader(Uri uri, XmlResolver xmlResolver)     at System.Xml.Xsl.Xslt.XsltLoader.Load(Compiler compiler, Object stylesheet, XmlResolver xmlResolver)     at System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil)     at System.Xml.Xsl.XslCompiledTransform.CompileXsltToQil(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)     at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)     at System.Xml.Xsl.XslCompiledTransform.Load(String stylesheetUri, XsltSettings settings, XmlResolver stylesheetResolver)     ... 3a15bf59-e14f-4070-84cd-44370e55aa6a05/30/2012 10:00:47.29* w3wp.exe (0x1E38)                       0x2E34 SharePoint 2010 FBA Pack       General                       0000 High     ...at Visigo.Sharepoint.FormsBasedAuthentication.Email.SendEmail(SPWeb web, String emailTo, String xsltTemplateFile, IDictionary xslValues) 3a15bf59-e14f-4070-84cd-44370e55aa6a05/30/2012 10:00:47.29 w3wp.exe (0x1E38)                       0x2E34 SharePoint 2010 FBA Pack       General                       0000 High     SendEmail failed 3a15bf59-e14f-4070-84cd-44370e55aa6a05/30/2012 10:00:47.31 w3wp.exe (0x1E38)

It looks like was unable to get the mail template, and tries to reach it using IP adress instead of domain name.

I think AAM is well configured, associating default zone with hostname and port values and the internet zone with the internet domain name value.

Anyone knows how to solve this issue?


Outbound mail and SMTP server is well configured. We don't use HTTPS

How about the register web part, does that work?

Also, you mentioned that you configured the xslt url's - does it work if you leave them at the default values? (See screenshots at http://sharepoint2010fba.codeplex.com/documentation)

The register webpart works ok, creates the user correctly. It doesn't send
the email, in this case no error is shown.
The same if I use the reset password button, no mail is sended and no error
is shown.
Outbound email is well configured because users are able to create alerts,
receiving emails of changes.
We made changes on the XSLT to translate texts into spanish but we didn't
change structure, file names or folder names, so we didn't need to change
xslt url's, are the same showed in the screeshots.
URL's seems correct. If I copy them in the adress bar of the browser ,
putting it before domain name, I can see correctly the XML structure. But
for some reason it looks like it's not accesible when code tries to
do it.

When you mention you can download the xslt file, can you do so anonymously? ie log out of SharePoint first and then download the file.  I've found permissions issues downloading them if Anonymous Access isn't turned on at the Web Application level, and if Anonymous Access isn't set to "Lists and Libraries" in the site collection.

Also, although it does look like a connection issue from the error message, you may want to try testing this with the original files included with the FBA Pack first - get that working, and then replace them with the modified ones.

Yes, I tried to open XLST files anonymously and are accesible.

I'll try to substitute the translated XSLT files with the original ones but I am afraid it won't work because, as you say, it looks like a connection issue. It is not possible to access by IP (restricted), only by domain name.

I think this is the problem but don't know how to solve it. The program uses SendMail function, passing SPWeb as a parameter, then don't know how it obtains the IP instead the domain name

It's an XslCompiledTransform object that's loading the xslt and printing out the error message with the IP Address. I'm not sure that it's actually using the IP to do the load, it has to use the URL - otherwise it wouldn't work in a lot of environments. It's probably just showing the IP in the error message - but it does seem strange.