|
You'll need to keep troubleshooting it.
There are two kinds of people in the world: those who can extrapolate from incomplete data.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
You have to explain it with more details like
1. What are you trying to do ?
2. Where do you get this error ?
3. Post the actual error with your question.
4. Are you using any browser to access it ? If so what browser are you using?
5. If you are referring the script from other pages , show the page where you refer it from?
|
|
|
|
|
Quote: 1. What are you trying to do ?
I have a code editor, I want to save it's contents when the user clicks save and then redirect to "Index". I started getting this error after implementing this, but now I get it whenever I try to redirect to "Index" action method.
Quote: 3. Post the actual error with your question.
Here's the details of the error:
Detailed Error Information:
Module StaticFileModule
Notification ExecuteRequestHandler
Handler StaticFile
Error Code 0x80070032
Quote: 4. Are you using any browser to access it ? If so what browser are you using?
Yes, I'm using google chrome.
Quote: 5. If you are referring the script from other pages , show the page where you refer it from?
I redirect from a partial view after the user clicks send.
This is my controller:
StudentsCodes modelSC = new StudentsCodes();
MicroG4 m4 = new MicroG4();
public ActionResult Index()
{
modelSC.Student = (Student)CurrentUser;
var user = UserManager.FindById(((Student)CurrentUser).InstructorID);
modelSC.Instructor =(Instructor) user;
modelSC.path = "~/Content/" + CurrentUser.UserName + "/CompilerProject/src";
return View(modelSC);
}
And this is the partial view:
@model application.Models.NewFolder1.StudentsCodes
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<script src="/Scripts/codeMirror-2.37/lib/codemirror.js"></script>
<script src="/Scripts/codeMirror-2.37/mode/clike/clike.js" type="text/javascript"></script>
<link href="/Scripts/codeMirror-2.37/lib/codemirror.css" rel="stylesheet" type="text/css" />
<link href="~/Scripts/codeMirror-2.37/theme/lesser-dark.css" rel="stylesheet" type="text/css" />
<script src="~/Scripts/jquery-3.1.1.min.js"></script>
<link href="∼/Content/bootstrap.min.css" rel="stylesheet" />
<script src="~/Scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="~/Scripts/jquery.unobtrusive-ajax.js"></script>
</head>
<body>
@using (Html.BeginForm("SaveClass","Development"))
{
<div class="CodeMirror cm-s-lesser-dark cm-error cm-bracket" style="position:absolute;border:solid;top:150px;left:450px;width:700px">
<div class="navbar navbar-inverse" style="border:none">
<div class="container-fluid">
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li role="presentation" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown">
File
</a>
<ul class="dropdown-menu">
<li>@Html.ActionLink("New", "NewClass", "Development", null, new { @class = "modal-link" })</li>
<li>@Html.ActionLink("Save","SaveClass","Development",null,new { id="save"})</li>
<li>@Html.ActionLink("Delete", "DeleteFile")</li>
</ul>
</li>
<li>@Html.ActionLink("Compile", "Compile", "Development")</li>
<li>@Html.ActionLink("Run", "Run", "Development")</li>
</ul>
</div>
</div>
</div>
@Html.TextAreaFor(m=>m.code, new { id = "code" })
@Html.HiddenFor(s => s.path)
</div>
}
<div id="modal-container" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-content"></div>
</div>
<style>
.modal-content {
width: 600px !important;
margin: 30px auto !important;
}
</style>
<script>
$(function(){
$("#save").click(function(e){
e.preventDefault();
$(this).closest("form").submit();
});
});
</script>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
matchBrackets: true,
mode: "text/x-java",
theme: "cm-s-lesser-dark"
});
</script>
<script type="text/javascript">
$(function () {
$('body').on('click', '.modal-link', function (e) {
e.preventDefault();
$(this).attr('data-target', '#modal-container');
$(this).attr('data-toggle', 'modal');
});
$('body').on('click', '.modal-close-btn', function () {
$('#modal-container').modal('hide');
});
$('#modal-container').on('hidden.bs.modal', function () {
$(this).removeData('bs.modal');
});
$('#CancelModal').on('click', function () {
return false;
});
});
</script>
</body>
</html>
|
|
|
|
|
|
 This is the Index view:
@model application.Models.NewFolder1.StudentsCodes
@{
ViewBag.Title = "Development";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<link href="∼/Content/bootstrap.css" rel="stylesheet" />
<link href="∼/Content/bootstrap-theme.css" rel="stylesheet" />
<script type="text/javascript" src="~/Scripts/jquery.unobtrusive-ajax.js"></script>
<script type="text/javascript" src="~/Scripts/jquery-3.1.1.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>
</head>
<body>
<div class="navbar navbar-inverse " style="left:0; width:300px;bottom:3px; position:fixed; top:50px; color:#4e4a4a; font:bold;">
<ul class="nav nav-pills nav-stacked">
<li>
@Model.Student.UserName
<ul>
<li>
CompilerProject
<ul>
@{
var m = Directory.GetDirectories(Server.MapPath("~/Content/" + Model.Student.UserName + "/CompilerProject"));
foreach (var subdir in m)
{
var name = Path.GetFileName(subdir);
<li>
@name
<ul id="tree">
@foreach (var file in Directory.GetFiles(Server.MapPath("~/Content/" + Model.Student.UserName + "/CompilerProject/" + name)))
{
var filename = Path.GetFileName(file);
<li class="filelist" value="@("~/Content/" + Model.Student.UserName + "/CompilerProject/src/" + filename)">
@filename
</li>
}
</ul>
</li>
}
}
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div id="partial">
@{
Html.RenderAction("DevelopmentPartial", new { path1 = Model.path});
}
</div>
<script>
$(document).ready(function () {
$('.filelist').on('click', function (e) {
alert('Im clicked on filePath = ' + $(this).attr('value'));
var filePath = $(this).attr('value');
$('#partial').load('DevelopmentPartial', { path1: filePath });
});
});
</script>
</body>
</html>
|
|
|
|
|
Are you sure this is a partial view ? It looks like you have a full html there
|
|
|
|
|
I need to refresh this part only of the page when the user clicks on a list element, so I used partial view.
This is my first website, I'm not sure if I'm doing things right.
|
|
|
|
|
This is the part I need to refresh:
Capture.JPG - Google Drive[^]
It's an online IDE, I want the user to be able to display the contents of a file once he clicks on its name.
|
|
|
|
|
well, I don't know what happened now! The error is gone but still, if I access the "Index" directly all it's functionalities work, if I redirect from another action method, nothing works!
|
|
|
|
|
I solved it by reordering the scripts in the header of the main view
<meta name="viewport" content="width=device-width" />
<link href="∼/Content/bootstrap.css" rel="stylesheet" />
<link href="∼/Content/bootstrap-theme.css" rel="stylesheet" />
<script type="text/javascript" src="~/Scripts/jquery-3.1.1.min.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>
<script type="text/javascript" src="~/Scripts/jquery.unobtrusive-ajax.js"></script>
:
Then I updated the script that loads the partial view:
<pre> <script type="text/javascript">
$(document).ready(function () {
$('.filelist').on('click', function (e) {
e.preventDefault();
alert('Im clicked on filePath = ' + $(this).attr('value'));
var filePath = $(this).attr('value');
$('#partial').load('@Url.Action("DevelopmentPartial", "Development")', { path1: filePath });
});
});
</script>
|
|
|
|
|
Are you saying that it is all working fine?
|
|
|
|
|
I still have a small problem with the drop-down menu doesn't show its list always, but I don't think it's relevant. So, yes I think it's all working fine.
|
|
|
|
|
|
Hello all
i am using telerik control in my ASP.NET MVC project, in the image control in the radEditor i cannot upload more than 4M image, so how i can upload image size more than 4M?
Please help
Thank you
|
|
|
|
|
|
All I am trying to open a new Angular 2.0 Project, I don't why did they make it so complex.
I selected File menu -> new Project -> C# -> then Asp.Net Core Angular 2 Starter Application (.Net Core), then I am getting the following error
The imported project C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props was not found. Confirm that the path in the <import> declaration is correct, and that the file exists on disk. C:\Users\aaleem01\Desktop\Angular2Apps\MyAngular2App\MyAngular2App\MyAngular2App.xproj
Can anybody please help me in fixing this issue, it is not even opening the solution saying error in creating the project. Any help is going to be very helpful.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
|
I downloaded it and restarted VS and restarted machine as well, but errors are persistent.
I am getting this following error:
Build:No inputs were found in config file 'C:/Users/aaleem01/Desktop/Angular2Apps/BSCSecurityAddressBookWeb/BSCSecurityAddressBookWeb/node_modules/angular2/es6/dev/tsconfig.json'. Specified 'include' paths were '["**/*"]' and 'exclude' paths were '["node_modules","bower_components","jspm_packages","../../dist/js/cjs"]'. BSCSecurityAddressBookWeb C:\Users\aaleem01\Desktop\Angular2Apps\BSCSecurityAddressBookWeb\BSCSecurityAddressBookWeb\tsc
Generic type 'Promise<t, r="">' requires 2 type argument(s)
I just don't what are those errors what's the reason for their occurrence, I would love to correct if I know why do they come.
Specially this error: Generic type 'Promise<t, r="">' requires 2 type argument(s) is appearing 675 times.
Getting tired, if my environment is not properly set Angular 2.0 team should give us strict dos and don'ts to avoid problems.
Any help would be very helpful. First of all there are so many things to download along with Angular 2.0 which leading to version mismatch easily, if they can give us all their related softwares along with their downloads would help or at least if they can give us strict notes what to have or what not to, it would be great helpful.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
Hi,
End point (HttpPost) calls a different web request by URL from the call.
It uses HttpWebRequest.GetRequestStream(...). Sometimes URL of HttpWebRequest is not available and it terminates by HttpWebRequest time out (100 sec by default) and HTTP queue can be filled up.
How can I fix it?
|
|
|
|
|
Assuming you're using a relatively recent version of WebAPI, make the handler async and use the HttpClient class[^] instead of HttpWebRequest .
By using async and await , you won't be blocking the request thread waiting for a response from the remote server. It will be free to return to the pool and service more requests.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thank you for your answer.
I tried to use PostAsJsonAsync of httpClient. The same story. On localhost: ASP:NET-Request Current=3, CurrentQueueSize=4 (MAX = 10). I don't know how can I handle a bad URL ...
And ... PostAsJsonAsync doesn't exit at all.
|
|
|
|
|
To get the PostAsJsonAsync method, you'll need to add a reference to the System.Net.Http.Formatting NuGet package[^].
And if you haven't got the method, I don't see how you could have tested it yet.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I can call the method ( response = await httpClient.PostAsJsonAsync(ud.Url, byteData) ) but it doesn't return any data, just hangs.
I'm using my API like a proxy.
modified 22-Mar-17 11:54am.
|
|
|
|
|
Well, if the URL isn't valid, it's still going to take just as long to time out.
The difference is, you're not blocking a thread from the request queue while you're waiting. Using an async endpoint, you should be able to keep serving other requests without the queue filling up.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You are right. But I can see that I can't call more than 10 requests (for limited queue = 10). I don't know why but IIS can start just 3 requests at one time (with the func). (Please note that URL is not valid. I don't know how I can handle it)
Additional info: Overall Elapsed: 0:01:24.132
modified 22-Mar-17 12:19pm.
|
|
|
|