See also questions close to this topic

I'm trying to find a my xml file called ClassData.xml, but can't find it. The file it self is hidden in a folder called Data. I Don't know how to get to the directory of my project where the file is. I'm using ios simulator.

So i want to insert values to database table with discord bot.
The problem is that it doesnt work. I double checked the server of the database, user, password, their all good but something is just wrong. Im trying to figure what is wrong.
Heres my code:

When I de-serialize an object using JsonConvert.DeserializeObject<MyViewModel>(serializedViewModel), it turns a token within the model that I need for a uri from:

...iVbdjdhasdfeeddDDCgxl6EpoZaw%2FiQGk%3D

into
...iVbdjdhasdfeeddDDCgxl6EpoZaw%253FiQGk%253D.

What appears to be happening is when the JSON from text file is processed by JsonConvert.DeserializeObject<MyViewModel>(serializedViewModel), the "%" characters are replaced by "%25", which obviously renders the token invalid.

Is there a way to handle this and other special characters with json.NET settings, or a different way?

Maybe this question has some explanation around but could not find the best solution to this:

I was reading this blog post from Mark Seemann about the captive dependencies and as far as I understand at the end of the post he comes to conclusion never or at least tries to avoid the captive dependencies otherwise there will be troubles (so far is OK). Here is another post from Autofac documentation.

They suggest using captive dependencies only by purpose (when you know what you are doing!). This made me think about a situation I have on my website. I have like 10 services, all of them rely on DbContext for database operations. I think they could easily be registered as InstancePerLifetimeScope if I fix the problem for DbContext not to hold it forever in memory attached to my services. (I am using Autofac in my case). So, I thought a good starting point would be to create all of these as per lifetime instances and the DbContext as instance per request. Then in my services, I would use something like that:

Does this pattern work correctly, I mean to not keep the dbContext forever attached to any service, so it will be disposed at the end of the request and if it works, is there any performance issue from this line:

If this works fine then there is another issue I am concerned of. So, if I can make my services as instances per lifetime (except DbContext), is there any issue to apply async-await on every method inside of the services to make them non-blocking methods. I am asking this if there is any issue using async-await for the dbContext instance, so, for example, I would have something like this:

public async MyModel GetMyModel()
{
var result = //await on a new task which will use dbcontext instance here
return Mapper.Map<MyModel>(result);
}

in the mailer method, then registration submission working but mailer is not going.

Actually I am new into asp.net mvc5 but mailer path as I declare same like web forms. Please help me to out this mailer issue. And I did not publish the my mvc5 project directly uploaded all files into live without publish.

// GET: /Account/Register
[AllowAnonymous]
public ActionResult Register()
{
//using database
using (ApplicationDbContext dbo = new ApplicationDbContext())
{
//data will save list of the consoleCheckBoxItem
var data = dbo.consolesCheckBox.ToList();
// because the view is request a common model, we will create new one
CommenModel a = new CommenModel();
a.ConsolesCheckBoxList = data;
// we will need to return common model, that way we will returen a
return View(a);
}
}

Or else i want to use javescript to print rdlc report without viewing the report viewer.

and also want to know how to change the size of report, to be 5mm width and 28mm height because i want to print barcode, i already changed the size of report from Report menu and then properties, but when i export it to Pdf for example the paper size is showing as A4 size when i try to print it i tried to print it on barcaode printer then it print only empty paper.

Although it returns webpage as pdf successfully, but I want to store it inside a folder.
What are the possible reasons for this Error? , I have checked all, it does not even contain property by the name name1

Update 1: Error is not in Path.Combine(), the error is in line before it.