Base solution for your next web application

Activities of "boeseb"

Hi,

Each time I use VisualStudio to deploy my project to our IIS server, the EntityFramework Provider specified in the EntityFramework-Project with all my repositories is missing in the deployment and I have to manually copy it to the IIS server to get the database access working.

When does WebDeploy include dependecies of a dependecy of the main project? How to include the EntityProvider in the deployment without reference it in the main project? Or should i reference it in the main project, isn't this bad for when i have to change the provider so i have to remeber to change it in two projects?

Sorry if this was already asked. I failed to find a topic that answers the question.

Hi again,

For my project i need to generate some dynamic pdf files, so the user can download them. I dont want to store them on disk, so i put code like this in my HomeController:

public class HomeController : MySpaControllerBase
    {
        IMyEntryAppService _myEntryService;
        public HomeController(IMyEntryAppService myEntryService)
        {
            _myEntryService=  myEntryService;
        }

        public void GetFile(long id)
        {
            EntryDto entry= _myEntryService.GetEntry(id); 

            using (MemoryStream workStream = new MemoryStream())
            {
                PdfDocument doc = new PdfDocument();               

                 doc.Info.Title = "Created with PDFsharp";

                // Create an empty page
                PdfPage page = doc.AddPage();

                // Get an XGraphics object for drawing
                XGraphics gfx = XGraphics.FromPdfPage(page);

                // Create a font
                XFont font = new XFont("Verdana", 20, XFontStyle.BoldItalic);

                // Draw the text
                gfx.DrawString(entry.SomeProperty, font, XBrushes.Black,
                   new XRect(0, 0, page.Width, page.Height),
                  XStringFormats.Center);

                doc.Save(workStream);

                byte[] byteInfo = workStream.ToArray();
                Response.Buffer = true;
                Response.AddHeader("Content-Disposition", "attachment; filename= " + Server.HtmlEncode("MyGeneratedFile.pdf"));
                Response.ContentType = "APPLICATION/pdf";
                Response.BinaryWrite(byteInfo);
                doc.Close();
            }
        }
}

I feel this code doesnt belong there and would fit better in the MyEntryAppService. Is there a way to manipulate the ResponseHeader of the AppService response like in the controller or is there even a cleaner solution to achieve the dynamic file generation/download?

Kind Regards, Sebastian

Hi, i recently started to work with your awesome framework to create a new company internal application. I realy like how everything is just plugable with the convention based dependency injection but now i reacht my limit of understanding how all works together. I try to use a SignalR Hub to broadcast some Events on the EventBus to the connected Clients but this fails. For more Info pls see my post on stackoverflow where i already posted some code that i use to get things to work.

[http://stackoverflow.com/questions/31294992/use-signalr-as-broadcaster-for-eventbus-events])

i just thought i would leave a link here so some experts for abp could have a look at it and maybe help me out solving this problem or hint me to an even better solution =)

Thx in advance.

And special thanks to hikalkan for his awesome work!

Showing 1 to 3 of 3 entries