|
I am working on a .NET Core product representing a web site server. There are HTML, JS, CSHTML, etc. files in the Team Foundation Services repository not necessarily organized in folders the same way they will end up on the system actually hosting the web site.
Is anyone aware of a utility that will take the source files, make a copy to an intermediate location, and then copy from the intermediate location to update the pages and files on the system hosting the web site?
I am changing the source files and want to see the changes reflected on the web site system, which is a VM that must be reached through an intermediate drop location. I can run the utility on the development system and the target system easily enough. It is a PITA to keep track of which files were modified and to keep copying the files by hand.
Just asking ahead of time, so I don't go rewrite the wheel.
I need a 32 bit unsigned value just to hold the number of coding WTF I see in a day …
|
|
|
|
|
in my project image is uploaded and stored using file upholder. and i need to display image in image control (for eg: in facebook we are uploading profile picture when we logged out and login the profile picture will be displayed.)..i need tat kind ..pls give me suggestion
|
|
|
|
|
You can get the idea from below link on how to retrieve image data from database and display on asp.net
Read Image from SQL With ASP.NET[^]
modified 20-Sep-20 21:01pm.
|
|
|
|
|
My requirement is straight forward. I have installed certificate , in binding added thee certificate. site is working in Https(e.g. https://abc) as expected.
But the requirement is , if any user Enters http://abc then it should redirect to https://abc
I have added the URL rewriting module. Created the Rule. The web.config file code as below
<rewrite>
<rules>
<rule name="http to https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^off$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
</rule>
</rules>
</rewrite>
Help out. Its not working.
|
|
|
|
|
This is what I use - slight differences from yours - and it works:
<rewrite>
<rules>
<rule name="httpsredirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
[edit] sorry, I'm a wombat - I just copied your original rule first time! My working one here now.
|
|
|
|
|
Yes you are right, as i have checked , this is mostly generic code which suppose to work, but my luck didn't clicked. So i went with a different way. Created a new website gave same Binding configuration (i.e. http://abc). Website contains Html file containing Js code to redirect to Https://abc. So each time user hits to Http://abc it redirects it to Https://abc by the Js code... It worked for me, But not sure how much it is recommended. 
|
|
|
|
|
That's not a great path to take. First, there's no guarantee that a user browser will properly support JS, and TLS is too important of a technology to leave to chance.
The problem is most likely that you did not have the URL Rewrite module installed. There's a download at URL Rewrite : The Official Microsoft IIS Site
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Hello,
I am using Visual Studio 2015, ASP.NET framework : 4.6.1
I am trying to do file upload and export to excel. both things were working fine in VS2010 but same form, same codes are not working on VS2015.
We already configured the following :-
In webconfig :-
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>
In Page :-
<Triggers>
<asp:PostBackTrigger ControlID="SaveBtn" />
</Triggers>
In Page Header :-
EnableEventValidation="false"
My codes are not generating any error, but even not working as expected in VS2015. If I just copy-paste the same page/code in VS2010 it will start working.
Remember : my scriptmanager is allocated in master file.
|
|
|
|
|
I don't think you're giving enough information for anyone to be able to help. There are two processes here for starters: the upload and the export. Can you not at least narrow the problem down to one or the other?
|
|
|
|
|
Thanks members for help.
I found the solutions.
I was facing issue due to some updated features of ScripManager (ajax). I required to set few properties, as it is :-
<asp:ScriptManager ID="ScriptManager1" runat="server" AjaxFrameworkMode="Explicit">
<Scripts>
<asp:ScriptReference Name="MicrosoftAjaxCore.js" />
<asp:ScriptReference Name="MicrosoftAjaxComponentModel.js" />
<%--<asp:ScriptReference Name="MicrosoftAjaxSerialization.js" />
<asp:ScriptReference Name="MicrosoftAjaxNetwork.js" />--%>
</Scripts>
</asp:ScriptManager>
after setting
AjaxFrameworkMode="Explicit"
my problem was resolved. about file upload control and export to excel (using response object).
but if I will only set
AjaxFrameworkMode="Explicit"
that is:- it will create another problem, it blocks few other javascripts; hence I need to set
<Scripts>
<asp:ScriptReference Name="MicrosoftAjaxCore.js" />
<asp:ScriptReference Name="MicrosoftAjaxComponentModel.js" />
</Scripts>
Now my project is working fine.
thanks a lot.
|
|
|
|
|
I have a gridview where I have checkboxes on each row. You can select the checkboxes and then hit a download button. The code returns back a multipaged pdf with the files you checkboxed.
How to do you use updateprogress to show the user that I am doing a process and to keep them from hitting download more than once. I tried with a button, but I am getting
Sys.WebForms.PageRequestManagerParserErrorException:
When I try a link button, the PDF is generated and downloaded, but no ajax updateprogress is visible.
Thanks
|
|
|
|
|
i need a chat in asp.net application as we are using in facebook. how it will be create?
|
|
|
|
|
|
i have created two image buttons and i have created positive and negative columns in sql. when i click the positive button,i need to increment the value in positive column in sql
|
|
|
|
|
Message Closed
modified 1-Sep-17 5:08am.
|
|
|
|
|
|
Hi,
I have been given a path of Git source Control folder which has git, hook, info etc folders inside it, I am trying to download the code hence I tried to Clone as suggested in a link, still it is putting .git folder inside my local folder which I have put as Destination and Subdirectory to Create, is there anything I am missing? Do I need to put any new SSH Key etc. I am really worried whom to ask because as there are many ways to download code using git maybe, its so much confusing. Its becoming hard and frustrating.
Thanks,
Abdul Aleem
"There is already enough hatred in the world lets spread love, compassion and affection."
|
|
|
|
|
<script src="../js/jquery-ui.js"></script>
<link href="../js/jquery-ui.css" rel="stylesheet" />
<input id="txtsearch" type="text" />
$('#txtsearch').autocomplete({
source: '~/CategoryHandler.ashx'
});
public void ProcessRequest(HttpContext context)
{
string name = context.Request["Name"] ?? "";
List<string> ls = new List<string>();
try
{
if (con.State == ConnectionState.Closed)
{
con.Open();
}
SqlCommand cmd = new SqlCommand("CategoryPro", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@action", "ShowCategoryName");
cmd.Parameters.AddWithValue("@serchname", name);
cmd.Parameters.Add("@msg", SqlDbType.VarChar, 500);
cmd.Parameters["@msg"].Direction = ParameterDirection.Output;
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
ls.Add(dr["Name"].ToString());
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
con.Close();
}
JavaScriptSerializer js = new JavaScriptSerializer();
context.Response.Write(js.Serialize(ls));
}
|
|
|
|
|
hi
I use asp.net/c# for my application, so I need to preview a report with crystal report but when printing the report I have to delete some labels from the report that means the preview and the printed report are not the same
Can any one help me, please
|
|
|
|
|
Hello Everyone,
I am trying to purchase application security testing tool for my company. Any recommendation? Budget is around $1500. Few tools like
Arachni
netsparker
syhunt
thanks
|
|
|
|
|
I am trying to split fullname into firstname and lastname using the following:
<asp:Label ID="lblPurchOnwer" Text='<%#Eval("buyername") %>' Style="width: 450px;
color: #0093B2; font-weight: bold;" runat="server"></asp:Label>
C#
var Buyernames = Eval("buyername");
var bFName = Buyernames.Substring(0, Buyernames.IndexOf(" "));
var bLName = Buyernames.Substring(Buyernames.IndexOf(" ") + 1);
but I am getting following error message:
'object' does not contain a definition for 'Substring' and no extension method 'Substring' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
Any ideas?
Thank you
|
|
|
|
|
Hi,
don't be lazy, stop using var (unless there is no way around it), use explicit types and your problem will vanish.
|
|
|
|
|
Luc Pattyn wrote: don't be lazy, stop using var (unless there is no way around it), use explicit types and your problem will vanish.
Nothing wrong with using
var at all - I prefer it as it reduces the code noise, but it's really personal choice. It also fits in with most other modern languages too.
[Edit] Weirdly this got downvoted.. anyone care to explain why?
Now is it bad enough that you let somebody else kick your butts without you trying to do it to each other? Now if we're all talking about the same man, and I think we are... it appears he's got a rather growing collection of our bikes.
modified 31-Aug-21 21:01pm.
|
|
|
|
|
Of course it is wrong to abuse var ; if OP had written either string or object the compiler would have made abundantly clear what was wrong with his code and this thread would never have been launched.
|
|
|
|
|
The OP's problem was with mis-using Eval, not declaring variables with var.
Now is it bad enough that you let somebody else kick your butts without you trying to do it to each other? Now if we're all talking about the same man, and I think we are... it appears he's got a rather growing collection of our bikes.
modified 31-Aug-21 21:01pm.
|
|
|
|