|
The problem is in the order of your code
catch (Exception e)
{
ViewBag.result = "NotAuthenticated";
return View("Index");
throw e;
}
Change to this: (for testing purposes only)
catch (Exception e)
{
ViewBag.result = "NotAuthenticated";
throw e;
return View("Index");
}
|
|
|
|
|
Hello everybody, how is the day going? I was over looking this to be a simple task but after involving my self, i found is not easy. I'm working on chat application and I'm done with the group chat. Now I want to implement private chat between two particular users. That is, John and Patel can chat privately in the private chat window and this is where am stuck. I need the technique to achieve this. I am not using signalR either ling to sql. Am using stored procedure. Any way to play around this please e.g sample code, steps, or videos.
|
|
|
|
|
Why you don't want to use SignalR? I think it is the good fit for your need. You may get sample application also on internet.
Otherwise, you may consider the older approach like long polling but you may need to do some hard work for it.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
Good day everybody! Please, I need your help in this stuff. How can i reset the id column in sql database which has auto increment property, to restart from 1 after hitting the delete button using asp.net and vb as code behind. I used the truncate statement but I didn't like this idea because everything was deleted. I specified the number of records to be deleted using the top statement with the delete statement.
|
|
|
|
|
This is a repost and you were answered on how to do it.
However, this sounds like an absolute terrible idea. You say you just deleted some records and now want to reseed the identity field? Bad, bad idea. Do not do it.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
First of all, it is Asp.Net forum. You should post your question to the right forum.
Secondly, it is not a good idea to reset identity column in a live application. Consider using Guid instead of Identity column.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
Good day everybody! Please, I need your help in this stuff. How can i reset the id column in sql database which has auto increment, to restart from 1 after hitting the delete button using asp.net and vb as code behind. I used th truncate statement but I didn't like this idea because I specified the number of records to be deleted using the top statement.
|
|
|
|
|
|
If you feel the need to do that, then maybe you don't understand IDs.
|
|
|
|
|
Good Day All
i have an asp.net 4.5 application. i have hosted it on IIS 7.5 in Windows Server 2008. My application has different folders within it and some are for JS and some are for CSS and etc.. and they are inside a directory named "Shared" in my problem and most of the things especially the css , images etc they are reference like this
<link href="../Shared/assets/css/bootstrap.css" rel="stylesheet"/>
<link rel="apple-touch-icon" sizes="57x57" href="../Shared/assets/ico/apple-touch-icon-57x57.png">
now when i host this Project i have issues with CSS and images because they are not retrieved. i use Fiddler to check what is happening and i realised that after i hosted the application now Fiddler reports a 404 error on the following path
http://myiisreserver/Shared/assets/css/bootstrap.css
there are many of them , this is just an Example. now you can see it it can see the server , but instead of adding my Application or website name , it add the Directory within my application. So basically it should look like this
http://myiisreserver/MyWebapplication/Shared/assets/css/bootstrap.css
What could be the Problem.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
The problem is you are using relative urls by using the ../ notation and now that you have deployed it your root appears to be different. You may just have IIS setup wrong as far as what an application is or you may need to change your links.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
The double dots means go back 1 folder level
So if your root is /
and your calling webpage is /about/default.aspx then the double dots apply ../images/header.jpg
If your root is /
and your calling webpage is /default.aspx, the the double dots don't apply /images/header.jpg
Best thing is to take out the dots, and test, to make sure it has nothing to do with the dots first, like the previous post says, confirm your web server is setup right. Then think about the dots when your web app works.
In my beginning, I didn't use the dots, but started using the dots after running test on them and seeing how they actually work.
[EDIT]
Here is some information on the history or use of the double dots so that you can better understand the meaning in various operating systems and URL's
http://en.wikipedia.org/wiki/Path_%28computing%29[^]
This Link is pretty good here
http://teaching.idallen.com/cst8207/12f/notes/160_pathnames.html[^]
I think this one fits the bill here
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005700000009000000.htm[^]
modified 21-Aug-14 15:47pm.
|
|
|
|
|
Thanks for your reply . the funny thing is that i hosted this same deployment in the Paid Domain and it works, So now what i did i created another website in IIS at the Level of "Default" website and i change the Default website port to 8083 so it does not conflict with my other website and i changed the new website to use port 80 and run the site with the ../share path and it worked. it buffles me.
When i used Fiddler , i see it was expecting my website to be in wwwroot folder but when i setup the web application in IIS the virtual Directory was in another drive. so i moved also the files to wwwroot.
Thanks again
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
When I encode a website or web application, I always assume that the root of the project is /
So everything is based off of /
Not sure if I can offer any help or insight on this, I went through that a decade ago, and have always used a systematic way of setting up servers and projects since then.
When I setup a website in IIS, I don't use the default IIS folder, I set everything up on a drive letter like Z
Z:\internet
We use an independent disk drive for websites, which is solid state.
In IIS, We set the Physical Path to let's say
Z:\internet\artisan-plaster.com
Z:\internet\website.com
Right Click website-> Manage Website -> Advanced Settings -> Physical Path
And then run our power shell or just cmd security scripts to that individual physical locations above to set IIS Anonymous and App Pool security for the folders in the project, and RW/RO folder attributes.
|
|
|
|
|
Its ok , everyone needs help at some point. for now my issue is resolved
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Could you help me.. I need function to compare 2 string and print (show) the difference between 2
|
|
|
|
|
Have a look at DiffPlex[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
|
Unhandled exception at line 79, column 1 in http://localhost:49456/about_us.aspx?_TSM_HiddenField_=ToolkitScriptManager_HiddenField&_TSM_CombinedScripts_=;;AjaxControlToolkit,+Version=1.0.20229.20821,+Culture=neutral,+PublicKeyToken=28f01b0e84b6d53e:en-US:c5c982cc-4942-4683-9b48-c2c58277700f:e2e86ef9:9ea3f0e2:9e8e87e9:1df13a87:4c9865be:ba594826:757f92c2
0x800a139e - JavaScript runtime error: Sys.ArgumentNullException: Value cannot be null.
above error occured for the following code
<td style="text-align:left" class="content">
<asp:TextBox ID="txtName" Width="225px" AutoPostBack ="true" runat="server"
ValidationGroup="valEnquiry" CausesValidation="True" TabIndex="1"></asp:TextBox>
<br />
<asp:RequiredFieldValidator ID="RFName" runat="server" ValidationGroup="valEnquiry" ControlToValidate="txtName" ErrorMessage="Please Enter Your Name" ForeColor="Red"></asp:RequiredFieldValidator>
<cc1:ValidatorCalloutExtender
ID="val_reqDTT"
runat="server"
TargetControlID="RFName">
</cc1:ValidatorCalloutExtender>
</td>
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
The message is telling you where the error occurs, and what type of error it was. However we cannot guess what your Javascript code is trying to do.
|
|
|
|
|
hi Richard thanks for your reply.
But there is no javascript code in the pages.
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
Then it must be in the Ajax code. You need to use your debugger to find out what value is missing, presumably the name field.
|
|
|
|
|
Thanks Richard. Thanks for your effort.
Need to add the following tag in web.config file for .Net Framework 4.5
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None">
</appSettings>
Have A Nice Day!
Murali.M
Blog
|
|
|
|
|
guys;
i have 2 request the first is post used to add cookies to response the other is a get request caused by Request.Redirect() call in the first one's server side.
my expectation is to find the added cookies in the second's request cookies, but what really happens is that the added cookies disappear.
please help me with this as i am stuck.
|
|
|
|