Ok, so duh... I was editing the web.config located in Program Files\Common Files\Microsoft Shared\web server extensions\60\CONFIG when the web.config that needs to be edited is in the web root under Inetpub.
dratcha
Posts
-
Developeing SharePoint web parts problem -
Developeing SharePoint web parts problemI started developing a web part but am having some security issues with it. I am trying to do some really simple stuff as shown below.
SPWeb mySite = SPControl.GetContextWeb(Context); output.WriteLine(SPEncode.HtmlEncode(mySite.Users.Count.ToString()));
It is the SPWeb line that is giving me the security error which is:Request for the permission of type Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c failed.
I started by making the webpart safe in the wss_minimaltrust.config file by using the Public key. That didn't work so I upgraded the trust level to Medium in the web.config file just to see what would happen. it still broke so I upgraded the trust level to Full. It still broke! This code is used by many others all over the web but I haven't seen them having any issues. Full trust should allow everything so why am I still getting a security error? Oh, and I did iisreset between each security change just to be sure it took hold. Thanks for any help! -
Algorithm for loan amortizationDoes anyone have an algorithm for a loan amortization? I have searched the web but all I can seem to find is lenders wanting to loan money. I want to make my own custom app where I can just put in the price, interest rate, and duration (years/months) to calculate an accurate schedule.
-
Newly created file stays lockedThat worked great! Thank you!
-
Newly created file stays lockedI am having a problem with creating a file in c#. More specifically, a problem that happens to the file after creation. First off, here is my code:
string strFileName = "c:\Test\file.log"; if(!System.IO.File.Exists(strFileName)) { System.IO.File.Create(strFileName); }
The file is created just fine. The probelm is that the aspnet_wp process keeps the file locked after it has been created so I can not write to the file. I can't even open it or delete the file manually. I have to go into Task Manager and kill the process. Is there some sort of cleanup I am missing here? Is it my code or the environment or...??? Thanks. -
IIS problemVisual Studio 2k3 runs on DotNetFramework 1.1 If you don't have Visual Studio 2k3 installed on the computer you are trying to run the c# code from, then you could just download the framework itself so you don't have to mess with another Visual Studio install. The easiest place to get the framework is windowsupdate from Microsoft. If you already have the framework installed, then it is another problem and you might have to supply more detail, like any error messages.
-
Regex: Very basic question* matches 0 or more occurences of the previous character or subexpression, while + matches 1 or more. Try this instead:
const string sRegEx = "[a-z]+[A-Z]+[0-9]+";
-
How to identify admin accountI am not quite sure I understand the question but the built-in administrator account in Windows 2000 is called Administrator. Any other account you create that you want to have admin privliges needs to be added to the administrators group.
-
IIS problemHave you installed the DotNet Framework on the server?
-
problem updating a xml doc with AppendChildI am trying to insert new nodes within an existing XML document. The insert that I am having problems with is a few nodes deep. I can insert a new node just below the root node with the following with no problems:
XmlDocument doc = new XmlDocument(); doc.Load(strXMLPath); XmlNode tasks = doc.SelectSingleNode("/tasks"); doc.AppendChild(tasks); // The rest of the AddElement and AddAttribute stuff has been omitted.
Now, here is the code which tries to write a little deeper down and is breaking:XmlDocument doc = new XmlDocument(); doc.Load(strXMLPath); XmlNode checks = doc.SelectSingleNode("/tasks/task[@id='1001']/checks"); doc.AppendChild(checks); // The rest of the AddElement and AddAttribute stuff has been omitted.
The error the second code snippet gives is: This document already has a DocumentElement node. It gives this error on the doc.AppendChild(checks); line I just can't figure it out. I did a quick watch onXmlNode checks = doc.SelectSingleNode("/tasks/task[@id='1001']/checks");
and it did put me in the correct node. I have no idea why I can not append into this node. Anyone have any ideas? Here is my XML doc if you want to see it for reference:<?xml version="1.0" encoding="utf-8"?> <tasks> <task id="1000"> <name>Task Name</name> <checks> <check id="1000_1"> <time>14:00</time> </check> <check id="1000_2"> <time>23:00</time> </check> </checks> </task> </tasks>
-
Get server name web app is running onHi, I was wondering if there was an easy way to get the server name that a website is running on so it can be displayed on the page. I can pull the server name from the registry, but am not sure if that is really the best way to do it. Is there something nice and simple out there, kind of like an equivalent to request.servervariables? Thanks.
-
DirectX 9 & c# problemI didn't see a DirectX board so I thought I'd post here since I am writing in C#. I am having an issue with setting some vectors on a CustomVertex. Here is my code:
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { device.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI/4, this.Width/this.Height, 1f, 50f); device.Transform.View = Matrix.LookAtLH(new Vector3(0,0,30), new Vector3(0,0,0), new Vector3(0,1,0)); device.RenderState.Lighting = false; device.RenderState.CullMode = Cull.None; CustomVertex.PositionColored[] vertices = new CustomVertex.PositionColored[3]; vertices[0].SetPosition(new Vector3(0f, 0f, 0f)); vertices[0].Color = Color.Red.ToArgb(); vertices[1].SetPosition(new Vector3(10f, 0f, 0f)); vertices[1].Color = Color.Green.ToArgb(); vertices[2].SetPosition(new Vector3(5f, 100f, 0f)); vertices[2].Color = Color.Yellow.ToArgb(); device.Clear(ClearFlags.Target, Color.DarkSlateBlue, 1.0f, 0); device.BeginScene(); device.VertexFormat = CustomVertex.PositionColored.Format; device.DrawUserPrimitives(PrimitiveType.TriangleList, 1, vertices); device.EndScene(); device.Present(); this.Invalidate(); }
The problem is with the vertices[x].SetPosition(new Vector3(0f, 0f, 0f)); When I try to compile, I get the error message: Microsoft.DirectX.Direct3D.CustomVertex.PositionColored does not contain a definition for SetPosition. I have also tried: vertices[x].Position.Add(new Vector3(0f, 0f, 0f)); This doesn't give me an error, but it also doesn't render anything on the screen. Also, I can render the triangle if I use CustomVertex.TransformedColored so I know that is working, but I need to use CustomVertex.PositionColored In most of the examples I have seen, this is how it is done. If you know DirectX, then you also know it is very hard to find any sort of good documentation on it too. I don't know if most examples I am following are 8.0 and earlier. Is there another way to do this? Am I doing it right but missing something? -
validatorSet your view button to CausesValidation="false" This can either be done via design view on the properties of the button, or in the html view by entering the text directly into the html:
-
simple beginer level questioni am guessing that "time" is a label. You are setting the text of the label in the script but not calling it in the html portion. It should look like this: Welcome In WebServerLand the time is currently:
-
Can't get the anything from e.Item.Cells[1].TextI am creating an asp.net site with c# as the backend. In this page, I have created a datagrid which uses TemplateColumns instead of BoundColumns. The problem I am having is that when I select a column with the edit button, I can't get a value back from e.Item.Cells[1].Text I can do the same exact thing in VB and it works fine though. Including a code sample which I made just to try and track down the issue. In the below code, I have a delete button that gives a pop-up listing for each e.Item.Cells[x].Text. The BoundColumn works, while the TemplateColumn does not work. Here is the datagrid: <%# DataBinder.Eval(Container.DataItem, "AssetTag") %> And here is the code behind: namespace SUSExemption { using System; using System.Data; using System.Drawing; using System.Web; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Data.SqlClient; using System.Configuration; using System.Web.Mail; /// /// Summary description for ucForm_Admin2. /// public class ucForm_Admin2 : System.Web.UI.UserControl { protected System.Web.UI.WebControls.Label lblUserLogin; protected System.Web.UI.WebControls.TextBox txtUserLogin; protected System.Web.UI.WebControls.Button btnUserSearch; protected System.Web.UI.WebControls.Label lblUserError; protected System.Web.UI.WebControls.Label lblUserName; protected System.Web.UI.WebControls.TextBox txtUserName; protected System.Web.UI.WebControls.Label lblUserManagerLogi