|
Thank you. We tried that and we have it working on a local PC server but when we move it to a regular Windows Server we get a permissions error. We have IIS_IUSRS full control and we still get the same error on the server. Are we missing some other sort of permission ?
We get this ................
Filename: redirection.config Error: Cannot read configuration file due to insufficient permissions
at Microsoft.Web.Administration.Interop.IAppHostAdminManager.GetAdminSection(String bstrSectionName, String bstrPath) at Microsoft.Web.Administration.Configuration.GetSectionInternal(ConfigurationSection section, String sectionPath, String locationPath) at Microsoft.Web.Administration.ServerManager.SitesSectionCreator() at Microsoft.Web.Administration.Lazy.Initialize[T](T& target, CreateInstanceDelegate`1 valueFactory) at Microsoft.Web.Administration.ServerManager.get_SitesSection() at Microsoft.Web.Administration.ServerManager.SitesCollectionCreator() at Microsoft.Web.Administration.Lazy.Initialize[T](T& target, CreateInstanceDelegate`1 valueFactory) at Microsoft.Web.Administration.ServerManager.get_Sites() at RefreshAppPool.Controllers.HomeController.GetApplicationPool()
|
|
|
|
|
Hi All,
I am a new developer using Visual Studio 2017.
I wish to create a Asp.net web application that will control (Allow/Deny) access to certain pages based on which Group the User is a member of in a already existing Active Directory Setup on our network(e.g. if the user is Member of "Accounts" Group they will only see Accounting pages).
How will I be able to implement this after creating a new ASP.NET application(project)?
I only know that there is a "Change Authentication" option when creating the solution, but how would I proceed from there?
After that, how would I reference the user's Group value to control page access?
Any help is greatly appreciated.
Regards,
Patrick
|
|
|
|
|
Hi out there,
I am working on Ajax Tab and come across many CSS for Ajax tab.
One of the thing which I do not see people mention if how to CSS a tab panel when it is disabled.
I do see CSS for active, normal, hover but nothing for disabled.
When I what to disable the tab, I use server code: "tabID.Enabled = false"
Yes, the tab is disabled, but I like change the text color to something else, say grey. Currently, it always showed as if normal.
My custom CSS is called "ajax__tab_xp1"
Please help. Thank you in advance.
|
|
|
|
|
Hi I have a web API and it returns IEnumerable<classa>. ClassA is a wrapper collections of ClassB and ClassC (as child property). If ClassB and ClassC has count 0, I can able to get data in my client from Web API. When Class B has value (greater than count 0), I get error "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host". I am working in VS 2017 and .Net Core 2.0 Please advise
|
|
|
|
|
hi,
I want to create a report with Group, like for example, all students of a School, then every class becomes a group, it displays only once for every group then each student information will be displayed in one row. When Class 1 finishes Class 2 starts but only once in the group. But Group (Class name) will be first column and rest follows in the same order, it looks like nothing but a query result but only thing is in query result for every record Group repeats but here Group should come only in the beginning of the group.
I am using stored procedure and Dataset to load the report, any help would be greatly helpful, a suggestion, code snippet or even a link helps a lot thanks in advance.
|
|
|
|
|
Hi,
I created a report and getting it displayed using ReportViewerForMvc, but I want to set its height, I tried in the below way by trying to set in the code of the Controller Action method but still its height is not set to the limit I want to set it to. Any help would be greatly helpful, thanks in advance.
Controller:
public ActionResult ShowLegalEntityReport(string legalEntityNumber, string lENumOperator, string legalEntityName, string lENameOperator
, string taxId, string taxIdOperator, string submittingCounty, string submCountyOperator, string legalEntityCity, string lECityOperator)
{
ReportViewer reportViewer = new ReportViewer();
reportViewer.ProcessingMode = ProcessingMode.Local;
reportViewer.SizeToReportContent = true;
reportViewer.Width = Unit.Percentage(900);
reportViewer.Height = Unit.Percentage(700);
DataRetrieveServiceClient drsc = new DataRetrieveServiceClient();
DataTable dt = CommonFunctions.ToDataTable(drsc.GetLegalEntityReport(legalEntityNumber, lENumOperator, legalEntityName, lENameOperator, taxId, taxIdOperator
, submittingCounty, submCountyOperator, legalEntityCity, lECityOperator));
reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"\Reports\LegalEntityReport.rdlc";
reportViewer.LocalReport.DataSources.Add(new ReportDataSource("LegalEntityDataSet", dt));
ViewBag.ReportViewer = reportViewer;
return View();
}
The reportviewer cshtml has the following:
@using ReportViewerForMvc;
@{
ViewBag.Title = "Show Legal Entity Report";
Layout = "~/Views/Shared/_LayoutFinal.cshtml";
}
@Html.ReportViewer(ViewBag.ReportViewer as Microsoft.Reporting.WebForms.ReportViewer)
modified 31-Oct-18 14:35pm.
|
|
|
|
|
At a guess, reportViewer.SizeToReportContent = true; tells the control to ignore the explicit width and height you've specified.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
If I don't set it the report may have gap after the content or it may exceed the width etc, is there any way just to set the width to the full content width but height has limit, I am not sure but if anybody can give me a better solution, it would a great help.
|
|
|
|
|
My table have 10 récords and when i use my method only have a "0" that means only read one record
using (SqlDataReader sdr = cmd.ExecuteReader())
{
while (sdr.Read())
{
if (string.IsNullOrEmpty(sdr["Code"].ToString()))
{
C_E = "0";
this.Update(C_E);
}
else
{
C_E = sdr["Code"].ToString();
this.Update(C_E);
}
}
|
|
|
|
|
If your reader just getting 1 records back from your stored procedure, you need to check the query in your SP to check if it really returning the expected data rows...
modified 20-Sep-20 21:01pm.
|
|
|
|
|
I wish to create a database-driven website in ASP.NET for a non-profit project validating election results in South Africa. I have extensive SharePoint experience, but licensing makes that a non-starter.
I can work in C# and Visual Studio, but have little experience building websites from scratch. I need to build a site that can accept data entry from multiple users, and also carry out large numbers of SQL queries. The site must be responsive from the outset.
Is there a website template I can use for Visual Studio, or would an ASP.NET CMS like Umbraco be best for me? I have not used MVC, but am familiar with coding in forms.
I would appreciate any comments and suggestions. This is a private initiative, and is being done part-time, and I want to concentrate on the database design and querying more than creating a good website framework.
|
|
|
|
|
Please do not repost the questions, if you want to make changes you can always edit your original post and add more information in that one, that helps members in answering your queries better.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
You should create site from scratch and use a html template to design and use MVC as it is easy to develop it in MVC
|
|
|
|
|
I am comfortable creating SQL databases, and reasonably adept at C# coding and normal website design. I need to create a database-driven website, where a number of users will capture data, and where many users will be able to view the results of a large number of different database queries. CMS capability would be a plus. I want a responsive interface from the word go, and I want to focus on my database development and querying, rather than building a website and basic CRUD operations from scratch.
Is there a website template available, with user management, and with the basic site infrastructure available, or should I use one of the ASP.NET CMSs, like Umbraco? I have extensive SharePoint experience, but the licensing prohibits SharePoint online. This is for a non-profit project aimed at election result validation in South Africa. I have not used MVC before.
Any thoughts, suggestions?
|
|
|
|
|
That is like a huge project, sadly, discussions are not that much broad to cover every aspect of this project. I will like to talk about a few key areas here,
Quote: I need to create a database-driven website Your best bet would be on an ORM, consider using something like Entity Framework and develop your website on top of that. It can help you with most of the SQL stuff that you will have to do yourself.
Entity Framework | Microsoft Docs
Quote: where a number of users will capture data, and where many users will be able to view the results of a large number of different database queries Please also study the publisher-consumer pattern, this seems to be moving toward that—something like a blog website where a few users are publishing content, and almost every user is reading it.
Producer–consumer problem - Wikipedia
Quote: CMS capability would be a plus. CMS or page builder? Both these have their own libraries and tools that you can use in ASP.NET.
Quote: I want a responsive interface from the word go That is what Bootstrap is there for.
Bootstrap · The most popular HTML, CSS, and JS library in the world.
Quote: Is there a website template available, with user management, and with the basic site infrastructure available, or should I use one of the ASP.NET CMSs, like Umbraco?
Yes, Umbraco is your only bet for the time being. And lastly, do not just depend on your extensive SQL knowledge and try to jump in the wild west of the Internet. There are several things that you need to know before you can publish the website, especially a website that is going to have a huge amount of user base and queries to database.
There are several concepts like, scaling, caching, security, responsiveness (as you have mentioned), and much more. Best bet is to consider an open source solution and leave everything to it. If you cannot then please study these concepts before moving forward.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
I'm reading a book and the author is discussing DI using Ninject. Now time/work constraint aren't allowing me to keep reading yet. Here is my question. I read that, for using 'deleting' user accounts in an individual login method.
Can I use DI to start the context object and pass it when need.
|
|
|
|
|
Yes.
"Never attribute to malice that which can be explained by stupidity."
- Hanlon's Razor
|
|
|
|
|
I have a radgrid hierarchy structure. When the user navigates to the third level and clicks on the parent tickmark on the grid, the RadGrid1_ItemCommand is fired and I can retrieve the parent "ProgramID".
But I need to pickup the parentID when the user clicks on the command-template button located just on top of the detail rows. I would like to get the value within a client-side function or server-side if that is easier??? (but cannot get that to work well).
Thank you for you help with this request!
Client-Side code:
function openWindowNEW(sender, args) {
var programID= parentItem.OwnerTableView.Items[sender.Item.ItemIndex].GetDataKeyValue("ProgramID"); //...not working
radopen("Storyboard.aspx?carID=programID, "RadWindow2");
}
Server-Side Code:
console.write((string) sender.Item.OwnerTableView.Items[e.Item.ItemIndex].GetDataKeyValue("ProgramID").ToString());
The code works below but it needs it to work from within a client-side function....
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.Item.OwnerTableView.DataSourceID == "SqlDataSource3")
{
GridDataItem parentItem = (GridDataItem)(e.Item.OwnerTableView.ParentItem);
if (parentItem != null)
{
//..tier 2 parent
Console.Write(parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["StrategicInitID"]);
//..tier 3 parent
HiddenProgramIDSelected.Value = (string)e.Item.OwnerTableView.Items[e.Item.ItemIndex].GetDataKeyValue("ProgramID").ToString();
}
}
}
|
|
|
|
|
|
I am trying to create to create two dynamic TextBoxes on Button click1. The first time i click i get 2.
The second time 4 ans so on when I only want two (2)
protected void Page_PreInit(object sender, EventArgs e)
{
List<string> keys = Request.Form.AllKeys.Where(key => key.Contains("txtDynamic")).ToList();
int i = 1;
foreach (string key in keys)
{
this.CreateTextBox("txtDynamic" + i);
i++;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
int index = pn1TextBoxes.Controls.OfType<TextBox>().ToList().Count + 1;
this.CreateTextBox("txtDynamic" + index);
}
private void CreateTextBox(string id)
{
for (int i = 1; i <= 2; i++)
{
TextBox txt = new TextBox();
txt.ID = id + i.ToString();
txt.TextMode = TextBoxMode.MultiLine;
txt.Height = 60;
txt.Width = 300;
pn1TextBoxes.Controls.Add(txt);
}
Literal lt = new Literal();
lt.Text = "<br/>";
pn1TextBoxes.Controls.Add(lt);
}
|
|
|
|
|
You'll probably want to read about ASP.NET Page Life Cycle Overview[^]
Basically the Page_PreInit() method is being called each time you click, before the click handler - so the code in the foreach loop is creating all your extra textboxes.
|
|
|
|
|
Put a breakpoint in the CreateTextBox and debug your code. Every time the function is called look at the stack trace and that will show you what is calling it. Alternatively put a breakpoint in all of your functions and debug your code, that will show you the order things are firing and so on and you should be able to work it out yourself from that.
|
|
|
|
|
Background
Within a restricted web development environment my team has the following installed:
- Visual Studio 2015 Professional (Release Version, not Update 3)
- Typescript 1.6 (via default install options of Visual Studio 2015 Professional)
- Note; a later version of Typescript (3.0x) can be made available via path variable but this is the version that is integrated via Typescript installation.
- Node JS 10.4 (via unzipping to directory and user PATH variable)
- NPM 6.1 (via unzipping to directory and user PATH variable)
- NPM Task Runner (Visual Studio 2015 extension)
- Webpack Task Runner (Visual Studio 2015 extension)
With this suite of tooling I’d like to attempt at working with an existing AngularJS/ASP.NET MVC 5+ portfolio consisting of several web applications.
Problem
My team can build the ASP.NET/C#/MVC 5+ middleware and backend components just fine; the problem is that there is essentially little to no Typescript debugging/IntelliSense/etc. experience available to them.
With Typescript 1.6 built into the Visual Studio 2015 Professional IDE, said constructs do not recognize the new Typescript methods/etc. that later versions of Typescript added. Therefore, as later libraries of Angular evolved over the course of 2+ years the built-in tooling within Visual Studio has become woefully out of date.
Because of this, local front-end development is painful to the point of being extremely time consuming and error-prone. If this were just one or two files the instruction would be to look past but with hundreds of files the experience is extremely degraded and the fear is said experience would lead to poor productivity and eventual bugs/defects leaking into upper environments (staging/production) due to the poor tooling.
Challenges
The following challenges persist in this environment which makes an easy resolution path difficult:
- No administrative rights on local development machines
*Any new tooling must come from stand-alone executables or configurations - Training of Existing Staff
- Any solution must be scalable such that new development teams can utilize
Current (Unsustainable) Solution
The way my team is resolving this now is via usage of remote desktop (via Windows RDP) into a specifically tailored remote server. However, said system is being decommissioned due to organizational policies. Therefore, future development must be performed via local installations.
My Current Path of Resolution
At this current point in time, I am looking into putting forward Visual Studio Code (via standalone executable and associated User-PATH variable edit) as an alternative to edit the Typescript-based files and using Visual Studio 2015 Professional for everything else. However, I know that the debugging/editing experience for this would not be ideal.
Questions
- Is there a way for Visual Studio 2015 Professional to utilize a different version of Typescript for the editing experience without installing a newer version of the Typescript SDK?
- If not; is there a way to disable editing of Typescript files within Visual Studio 2015?
- I have tried to alter the “csproj” project files by setting the following to no avail.
-
<TypeScriptEnabled>false</TypeScriptEnabled>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> -
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.Default.props" Condition="True" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="True" /> - Are there any alternatives to the above worth considering?
Any advice welcome. Thank you for your time.
|
|
|
|
|
I use VS2017 for a Angular V6 .Net Core 2.1.2 project.
Went through many GitHub templates before I found one I liked, in which I had to heavily modify to my liking.
Try and find a template that matches your requirements, download it and use it in VS2015 and see what it does.
If I remember, VS2015 was pretty friendly with NPM, Gulp, Bower and may support TypeScript Linting and Intellisense.
I don't have enough SSD space to load VS2015 and test a copy of my project so I just have VS2017 and VS2013 for the InstallSheild.
Take a look at this
ASP.Net Core2.0, Angular6 - SPA
Guess VS2017 looks at the tsConfig.json file in the root folder of your project to load Linting and Intelisense.
And a tslint.json file
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": true,
"noImplicitAny": true,
"skipLibCheck": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"lib": [
"es2015",
"dom"
],
"typeRoots": [
"./node_modules/@types/"
]
},
"exclude": [
"node_modules",
"./angularApp/main-aot.ts"
],
"include": [
"**/*.ts",
"../node_modules/angular-bootstrap-md/angular-bootstrap-md/index.ts",
"../node_modules/angular-bootstrap-md/angular-bootstrap-md.d.ts"
],
"awesomeTypescriptLoaderOptions": {
"useWebpackText": true
},
"compileOnSave": false,
"buildOnSave": false
}
tslint;json
{
"rules": {
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"eofline": true,
"forin": true,
"import-blacklist": [ true ],
"import-spacing": true,
"indent": [
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [
true,
300
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"public-static-field",
"public-instance-field",
"public-constructor",
"private-static-field",
"private-instance-field",
"private-constructor",
"public-instance-method",
"protected-instance-method",
"private-instance-method"
]
}
],
"no-arg": true,
"no-bitwise": true,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-variable": true,
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": [ true, "ignore-params" ],
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"prefer-const": true,
"quotemark": [
true,
"single"
],
"radix": true,
"semicolon": [
true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"typeof-compare": true,
"unified-signatures": true,
"variable-name": false,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"directive-selector": [ true, "attribute", "app", "camelCase" ],
"component-selector": [ true, "element", "app", "kebab-case" ],
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-input-rename": true,
"no-output-rename": true,
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true,
"no-access-missing-member": true,
"templates-use-public": true,
"invoke-injectable": true
},
"rulesDirectory": [
"node_modules/codelyzer"
]
}
I just don't have the resources to give you a better answer.
Learning Angular 6 wrapped in .Net Core 2.1 was hard enough.
If it ain't broke don't fix it
Discover my world at jkirkerx.com
modified 25-Sep-18 14:22pm.
|
|
|
|
|
Message Closed
modified 23-Sep-18 16:24pm.
|
|
|
|
|