我一直在与这个斗争几个小时没有进展.
我正在尝试将Web应用程序(MVC3,.net4,在Visual Studio 2010中制作)发布到服务器.所有谷歌最终都会导致这篇文章,这篇文章没有用.根据它,运行在IIS 6上的MVC3(安装了MVC和.net4,它是一个2k3服务器)应该可以工作.不同的设置给我不同的问题,但没有任何作用.使用默认设置,我得到"目录列表被拒绝此虚拟目录不允许列出内容".如果我打开目录浏览,我可以看到网站的directoy,但这没用.
在IIS中有一个使用默认页面的选项,但我认为MVC没有使用它.当我启动它时,我的项目中没有"default.aspx",它通过调试测试本地服务器工作正常.如果我需要一个默认页面,我不知道如何制作一个.如果我不需要,我需要在IIS 6中使用哪些设置才能正确地为页面提供服务(使用mvc模块?).
这是我的第一个网络应用程序,所以我可能遗漏了一些基本的东西.我完全可以从项目中删除一些关键文件.
编辑:不确定它是否有所作为,但该网站未发布到域的根目录.该URL最终为www.company.net/directory.
编辑:我尝试在visual studio中创建一个新的MVC3应用程序,只是默认应用程序,并立即将其发布到服务器.同样的错误.它绝对是IIS中的东西.
我有一个foreach使用称为的observablearray CertificateDetailsToShow。 CertificateDetailsToShow有一个名为的列LoanNum。嵌套在foreach中,我有一个选择列表,该列表使用名为DDABankNums 的observablearray (填充选择列表选项)。它具有称为的属性mLoanNum。我想根据LoanNum两个observablearrays(DDABankNums.mLoanNum = CertificateDetailsToShow.LoanNum)过滤选择列表中显示的内容。我怎样才能做到这一点?
我的查看代码-
<tbody data-bind="foreach: CertificateDetailsToShow">
<tr id="Tr1" style="cursor: pointer">
<td>
<ul style="width: 100%">
<h5 class="muted"><b>Loan: <span class="muted" data-bind="text: LoanNum"></span> (<span data-bind=" text: CurrType"></span>)</b>
<select id="Select1" style="margin-top: 0px; height: 24px; width: 160px !important"
data-bind="options: $parent.DDABankNums, optionsText: 'AccountName', value: $parent.mLoanNum, optionsCaption: $data.LoanNum">
</select>
</h5>
</ul>
</td>
</tr>
</tbody>
Run Code Online (Sandbox Code Playgroud) 我使用TabControl来托管工作区,使用John Smith撰写的这篇神奇文章中概述的方法.我想知道是否有一种方法可以在没有标签的情况下向标签控件添加内容,如图像.排序默认或空行为.我想要一个应用程序徽标,或者一些有用的箭头,这是Chrome首次使用的标签.
编辑:这可能有点复杂.我在下面的标准tabcontrol上尝试了Chad的解决方案.但是,我用于工作空间的tabcontrol是由使用datatemplate的内容控件呈现的,我无法使用它来解决它的问题.HB的解决方案适用于一些变化.
<DataTemplate x:Key="WorkspacesTemplate">
<Grid>
<Image Name="image1" Stretch="Uniform" Source="/Affinity;component/Images/affinity_logo.png" Margin="20"/>
<TabControl IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding}"
ItemTemplate="{StaticResource ClosableTabItemTemplate}" Margin="4">
<TabControl.Style>
<Style TargetType="TabControl">
<Style.Triggers>
<DataTrigger Binding="{Binding Items.Count, RelativeSource={RelativeSource Self}}"
Value="0">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
</Style.Triggers>
</Style>
</TabControl.Style>
<TabControl.Template>
<ControlTemplate TargetType="TabControl">
<Grid Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" >
<StackPanel x:Name="HeaderPanel"
Orientation="Horizontal"
Panel.ZIndex ="1"
KeyboardNavigation.TabIndex="1"
Grid.Column="0"
Grid.Row="0"
Margin="2,2,2,0"
IsItemsHost="true"/>
</ScrollViewer>
<ContentPresenter x:Name="PART_SelectedContentHost" Grid.Row="1"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
Margin="{TemplateBinding Padding}"
ContentSource="SelectedContent"/>
</Grid>
</ControlTemplate>
</TabControl.Template>
</TabControl>
</Grid>
</DataTemplate>
Run Code Online (Sandbox Code Playgroud) 所以我的控制器的结构可能是罪魁祸首.在这里您可以看到父控制器和子控制器,但重要的部分在这里:
家长控制器
//Load version
$scope.person = People.people.get({ id: $routeParams.id}, function(person) {
var associations = {
events: person.events || [],
people: person.people || [],
places: person.places || []
};
$scope.$broadcast('setAssociations', associations);
});
//Event version
$scope.$on('getAssociations', function(e, args) {
var associations = {
events: $scope.person.events || [],
people: $scope.person.people || [],
places: $scope.person.places || []
};
$scope.$broadcast('setAssociations', associations);
});
Run Code Online (Sandbox Code Playgroud)
儿童控制器
$scope.$on('setAssociations', function(event, args) {
$scope.parentEvents = args.events;
});
$scope.$emit('getAssociations', {});
Run Code Online (Sandbox Code Playgroud)
我的想法是我需要events从父person对象到子控制器.问题是,每个setAssociations从父母抚养的方法只能在一个上下文中工作.
load …
.net-4.0 ×1
angularjs ×1
iis-6 ×1
javascript ×1
json ×1
knockout-2.0 ×1
knockout.js ×1
tabcontrol ×1
wpf ×1