Questions tagged as 'c#'

1
answer

Save excel automatically generated in ASP MVC application

I am generating Excel files in my application using EPPlus . There is now a need to automatically save these files to a folder, regardless of whether or not you download them, so that you can keep track of these files. In my code I have: p...
asked by 24.04.2014 / 11:15
1
answer

When you upload a DLL in the folder "bin" all users lose session

Every time I upload a DLL from my site, I drop all users who need session to stay logged in. I was using the build that turns everything into .dll and .compiled however when compiling to .aspx + .dll the same thing happens. ex: I...
asked by 02.05.2014 / 16:14
1
answer

How to create a Custom Attribute?

For some time now I'm trying to understand the concept of custom attribute from C #. I think it kind of looks like Python's decorators system. But I'm not understanding very well. I gave a codeProject article , but not yet it was clear....
asked by 19.03.2016 / 23:43
1
answer

Is it possible to use MD6 in C #?

hash , is it possible to use MD6 in C #? Would anyone have an example of the use in a simple string ? In my searches I did not find anything very objective.     
asked by 16.09.2015 / 22:40
1
answer

Add migration and make update at runtime EntityFramework

I'm developing an application and the need to add migration and run the update at runtime. I already have all the part that loads the modules: public class ClientContext : DbContext { protected override void OnModelCreating(DbModelBuil...
asked by 10.06.2015 / 03:31
2
answers

Regular expression, removing values from HTML

I have an HTML that I need to retrieve the values from a set of <li> . This is part of HTML: <ul id="minhas-tags"> <li><em>Tagged: </em></li> <li><a href="/tags/tag1">tag1</a>,...
asked by 29.05.2015 / 02:52
2
answers

Only parameterless constructors and initializers are supported in LINQ to Entities - Asp.Net MVC

I'm developing an application that manages courses. The student, when entering the inscription screen and clicking on the "enrollment" button, is associated to a course, that is, is enrolled. So far so good, only when I try to check if he is alr...
asked by 06.06.2015 / 18:17
1
answer

Parameterizing DataSet in C #

I created a search screen with textbox , button and gridview . I would like the search results to appear in this Gridview but I can only do this with a Dataset . In this case, I needed to find a way to pass parame...
asked by 19.06.2016 / 18:32
3
answers

Out Of Memory When Running a GetFiles in a Very Large Directory

I currently have a directory with multiple subdirectories that have more than 3 million files. I need to map only the directory where these files are. And this mapping should be separated by file type. The big problems are when I run a .Ge...
asked by 18.07.2016 / 15:39
1
answer

How to get the HostName from the client using C #?

I need to save in that machine the user performed a certain action, for that I was using the following excerpt: string maquina = Dns.GetHostName(); But I hardly knew that this would return the HostName of the server. How do I get the HostNa...
asked by 07.11.2017 / 18:36