AZURE Hosting & MVC5 Reporting - c#

I am developing an MVC5/EF6 web application hosted on Azure using Visual Studio 2013. I have just got to the portion of development whereby I need to create the reports. I was trying to use Microsoft.ReportViewer to achieve this and although it works perfectly locally it would appear that the WOW (WAWS) on a standard Azure website does not have/allow enough privileges to generate/return a PDF via a stream reader (http://social.msdn.microsoft.com/Forums/windowsazure/en-US/b4a6eb43-0013-435f-9d11-00ee26a8d017/report-viewer-error-on-export-pdf-or-excel-from-azure-web-sites?forum=windowsazurewebsitespreview). The suggestion from Microsoft was to convert the web site to a web role - I am prepared to do this however it seemed like a "no go" for most contributors - also I cant find any tutorials on the matter (I have posted a new question on this).
My question is, what are my options? SSRS is being deprecated so a server call is out, hand cranking a HTML page does not appeal. The closest I have found to a solution breaks the MVC pattern, but should work see here:
Rendering an RDLC report in HTML in ASP.NET MVC
Any help would be greatly appreciated!
Cheers
David

I ended up creating a web role to gain access to GDI+ and elevated WOWs rights, from there I was able to export directly to PDF which is just what I wanted. Not sure why so many other articles condemned this it seems to work perfectly and the cost differentiator does not seem too bad... yes it is more - however, experiments with the extra small VM has proved quite successful.

Related

Publishing ASP.NET application using third party hosting

I have developed an ASP.NET C# Web application with 2 web forms and I have purchased a domain from Fasthosts in order to host my site. I have changed the server to be Windows-based and used the correct ftp details to upload my app to the site. The only problem I am having is that when the site is published I am receiving this error.
I am hoping that this issue is fairly easy to resolve. Any help on what I can do to get around this issue would be much appreciated. Thanks:)
Since you have not provided details of any set up using IIS, I would imagine that your issue is that you have simply deployed the file and gone to the URL expecting the site to be there. Normally you'd have some setup to do, unless they are handling that for you?
Have you make sure that you have setup your default page? Do they support .net core? Maybe this post https://windowswebhostingreview.com/troubleshoot-403-error-when-publishing-asp-net-core/ can help you.

Using ASP.NET Application Account Login for Hosted Websites

Visual Studio 2010 has a way to create a new website.
I have done that with 4 different websites, all are hosted remotely on Godaddy, and they all run fine.
All of these sites come with a default Microsoft login link:
The link goes to documentation on MSDN, but that documentation covers everything in depth. I'm not a DBA, and I have never figured out how to get one of my websites to use this feature.
In the past, I have either deleted those links or set them so they were not displayed.
Now, I'd like to learn what is required to getting them to working - just something basic.
I went there and created a new, blank Microsoft SQL database. The tables are not setup, though. That may be all I need!
Looking at the default settings in the web.config file, it looks like I can simply edit the connection string to be what I need.
Microsoft posts a link in their code, but I must confess that I really don't know what I'm looking for, so it is hard to tell when I am looking at the solution.
For a hosted website (like GoDaddy), does anyone know how to get the database setup?
I'm looking for a spoon fed, Step-By-Step, "How To" for dummies like me that spend most of their time developing Windows Forms.
You are using ASP.Net - Legacy SQL Membership Provider. It has been deprecated long time ago.
ASP.Net Identity 2 is new, but it requires .Net 4.5
Closest to Legacy Membership Provider is ASP.NET Universal Providers.
Link from the 2nd picture is for web.config in general. It doesn't include any information about Membership Provider.

wkhtmltopdf not working on intranet sites using C# MVC3

I'm having issues with converting my Intranet Page to PDF file. I used 2 solutions which actually works, however with some issues.
Solution 1:
I used wkhtmltopdf.exe tool. I was able to make it work on my local machine.
However, when I deployed it to our Server, it stopped working until I notice that it's not working with intranet sites. When I tried extranet sites, it's working.
Solution 2:
I took an alternative solution by getting the HTML of that site, and let the wkhtmltopdf.exe tool to make it PDF which also works, however, the data on my page that I'm trying to convert to PDF is database driven. So all information including images was not supplied when it was converted to PDF.
Please help if there's a way to make the wkhtmltopdf.exe tool work in Intranet Sites(solution 1) or
how I can retrieve the whole page including data and images when converting it to PDF(solution 2)
Thank you very much!
it stopped working until I notice that it's not working with intranet sites.
That is not an exhaustive problem report. I have done it by rendering a view to a string and then converting that string to a pdf using wkhtmltopdf.
Rendering the view to a string: Render a view as a string
i did not include wkhtmltopdf direct, rather I used the tuespechkin nuget package: https://github.com/tuespetre/TuesPechkin
I would say to look at the permissions available. Intranet sites normally have different permission levels than a public facing site. It could be that the public facing sites have permissions that have been applied to the .exe such as the IIS_IUSR account to enable it to work with anonymous guest accounts, but lack the permissions needed in an intranet which often uses the domain user account of the logged in user to authenticate resources.
For whtmltopdf software to generate pdf on your intranet server, you need to have 2 files msvcp120.dll & msvrp120.dll in the same folder as wkhtmltopdf.exe file to running from server side. Hope this helps.

Implementing DotNetOpenid in my asp.net website

I am trying to implement DotNetOpenid in my asp.net website. However, the more I try to read up on DotNetOpenid, the more confused I get. My initial goal is to allow user login process (similar to StackOverflow).
I attempted to get some help via this question dotnetopenid tutorial
but was unsuccessful (since I am not using MVC)
How can I get a tutorial that would help me accomplish that?
I would first start at the developers site
Coding Guidelines
Quick Start
Code Snippets
I have been posting my questions here Support Forum. Pretty helpful.
The ASP.NET OpenID web site (C#) project template isn't a tuturial, but it does create a functioning OpenID ASP.NET web site.
I just installed it and was able to get a site up and running. Here are a few gotchas that I ran into:
When you create a new project using the template, do not choose a deep path - this will create problems during database creation.
When you first run the application, you'll hit an exception - don't worry about it. When you get the YSOD, simply browse to the Setup.aspx page mentioned in the instructions.
If you don't have an OpenID, you'll need to get one. The initial page loaded after database creation has a 'Get OpenID' link if you need to get one. It's a simple process and only takes a few minutes.
Once you get through that, you'll have a working implementation of an OpenID web site.
You might also want to check out the DotNet OpenAuth ASP.NET Controls.
HTH
Edit
For anyone interested, there is also an ASP.NET MVC 2 OpenID web site (C#) template. I'm surprised #Andrew Arnott answered the other question and didn't mention these, since he is the author.

How to host a Silverlight app in a Sharepoint 2007 Web Part

There has been a flurry of updates released to Microsoft's Silverlight over the past couple of months (Silverlight 2 beta 2 runtime + dev tools, RC0 + dev tools which broke beta 2 apps), and recently Microsoft has released the RTM.
I have been trying (unsuccessfully) to integrate Sharepoint 2007 and Silverlight. Many of the sharepoint/silverlight blogs i have read are outdated, meaning that they target SL Beta 2.
So, my question is...
What steps are necessary in order to host a Silverlight 2.0 (RTM) application, in a web part, on Sharepoint Server 2007 ?
I haven't tried this out but
it seems like a good start:
Silverlight Blueprint for SharePoint
This isn't too difficult to do. There are a few steps you need to follow:
Update IIS with the xap mime type.
Put your files some that SharePoint can get them. In our case we developed a feature which deployed the silverlight javascript files and our xap out to folders in the ISAPI folder (%Program Files%\Common Files\Microsoft Shared\web server extensions\12\ISAPI). We created a folder called _xaps to host these files.
Put the Silverlight object code in either the page itself or in a content web part.
[EDIT: For some reason my object code isn't showing up. So here is a link to an example instead]
That's all there is to it. You're probably best off creating a feature to copy of the files and update whatever page you're hosting the control in. But to just stick silverlight in SharePoint the above should work.
This might help: http://www.u2u.info/Blogs/Karine/Lists/Posts/Post.aspx?ID=40
If you are going to be using User Controls [i.e. Web Parts], then I'd highly recommend looking at SmartPart. You'll still need to do the things in the blogs above to get the assemblies recognized, trusted, etc, but this may help you get your user controls deployed faster.

Categories

Resources